ABitSmart
Posts
-
windows media player control -
Cant see columns in listview on designerI copied your code as it is in to a new WPF Project and I had no problems at all i.e. the columns were visible in designer. I use VS2008(SP1).
-
Command for Button, check if right clickedI have a different opinion though. I feel separating it into a different section would make it easier to follow. It would demarcate the properties and bindings into separate group instead of all of them being together. It looks neat with just two entries but I would go crazy when the properties/bindings set through XAML would increase and make the node look ugly. This method has the obvious advantages of inherent implementation and access to all Mouse gestures in addition to the left and right click. But hey, as you feel comfortable. Cheers :)
-
How to detect the user IP?If the user is behind a proxy then REMOTE_ADDR will be the proxy IP address and HTTP_X_FORWARDED_FOR will be the client IP address. HTTP_X_FORWARDED_FOR can consist of multiple comma separated IP addresses for each proxy the request passes through. Generally, client IP is the first of them. Finally, you can rely on the above methods only for Transparent proxies. There is no way to trace the actual IP in case of Anonymous or Distorting proxies. One more good tool for finding country from an IP is this one[^] on codeplex.
-
Command for Button, check if right clickedYou can do it with a MouseBinding. Did you see my suggestion[^] ?
-
Command for Button, check if right clickedYou can add a MouseBinding(or MouseGesture). Something like this,
<MouseBinding Gesture="LeftClick"
Command="ApplicationCommands.Open" />MouseBinding needs the Mouse action and the routed command to be executed. You will have to add another MouseBinding for Right-click and also change the Command value to the routed command to be executed in your case. For more details, see here[^], here[^] and here[^]
-
Control in Grid !Code-behind would be something like this,
yourControl.SetValue(Grid.RowProperty,1);//first row
yourControl.SetValue(Grid.ColumnProperty, 1);//first column -
How to select File Menu Items using Keyboard in WPF and C#? -
How to add text to the GridView in wpf?This is my best attempt.
public class LogMessage
{
public string Message_Name { get; set; }
public DateTime LogTime { get; set; }
}Then you have your list of messages like this,
List<LogMessage> messages = new List<LogMessage>();
messages.Add(new LogMessage(){Message_Name = "Dummy Message", LogTime = DateTime.Now});lstViewLogWindow.DataContext = messages;
-
How to add text to the GridView in wpf?You have misunderstood what I said. Assign the LIST of MESSAGE to the DataContext. e.g.,
lstViewLogWindow.DataContext = yourListOfMessages;
where
yourListOfMessages
is something like 'List<YourMessageType>
' andYourMessageType
is a type having Message_Name andDateTime
property -
How to add text to the GridView in wpf?By adding the item explicitly you are overriding the binding mechanism. You should do it by binding. Assign ListView's DataContext with the list of messages.Something like this,
lstViewLogWindow.DataContext = yourListOfMessages;
-
Editing items in a bound ListBox?But you have not bound any property of the collection to the ListBox item. How do you expect the collection to change?
-
Editing items in a bound ListBox? -
Editing items in a bound ListBox?It won't work because you are binding the TextBox to the ContentPresenter. There is no binding to your data element at all.
-
Editing items in a bound ListBox?You code did not come through.
-
Data binding from a List to a GridOk. So, data is displaying correctly just the updates you make to PhotoMetadataList are not getting propogated to PhotoInformationWindow ? Updates(CollectionChanged/PropertyChange?) are done in PhotoInformationWindow itself or in the Parent Window ? Well, any DataBinding errors in the Output window ? If my questions seem relevant then, How about setting
PhotoMetadataList
as theDataContext
ofPhotoInformationWindow
instead of accessing it as a_StaticResource_
? After setting it as theDataContext
of PhotoInformationWindow bind ListView's ItemsSource usingRelativeSource
binding. I would certainly try attempting this with a WPF ListView (if its a similar model) before making frustrating attempts with the third party control vendor. -
Data binding from a List to a Grid -
Templates and Custom Classes [modified]If it answer's your question - Style Triggers[^] ?
-
Conditional XAML -
WPF Combobox not navigating to items on key pressSR81 wrote:
It could be because the combobox contains nearlly 500 rows?
That doesn't seem logical. Perhaps because changes to VisualTree will be making it difficult to decide what to use as SelectedValuePath. Just a guess.