Thanks for the help! Going to go try this out now.
xtr33me
Posts
-
After changing global bool, IsEnabled property is not updating -
After changing global bool, IsEnabled property is not updatingThanks for the help!
-
After changing global bool, IsEnabled property is not updatingI am using WPF .Net 4.0 and I have a Window that populates a number of controls with data from a file. These are all within a DockingManager ContentControl which I then have its IsEnabled property bound to a global boolean variable. Now when the window first loads, it is correctly enabled or disabled based on what default value I set to it. However when I select "Edit Network" from my context menu, I update the global bool, which does update when I put a breakpoint, but the ContentControls IsEnabled property does not get set. Any ideas as to why this may be? Is there a view update I need to call or something?
<ContentControl Name="contentCtrlValues"
syncfusion:DockingManager.Header="Current Values"
syncfusion:DockingManager.CanAutoHide="False"
Visibility="Visible"
syncfusion:DockingManager.State="Document"
syncfusion:DockingManager.CanDock="False"
syncfusion:DockingManager.CanFloat="False" IsEnabled="{Binding Path=NetEnabled,
ElementName=window1, Mode=TwoWay}">private Boolean bNetIDEnabled = false; public Boolean NetEnabled { get { return bNetIDEnabled; } set { bNetIDEnabled = value; } } private void HandleEditNetwork(object sender, RoutedEventArgs e) { NetEnabled = true; }
-
Combobox.SelectedItem assignment not working when adding items staticallySorry this is WPF and I am working in VS2010 .Net 4.0.
-
Combobox.SelectedItem assignment not working when adding items staticallyI am having an issue and have scoured the net looking for an answer and I still have yet to find one so I thought I would post here while continuing my search. I simply want to set SelectedItem to a string value and have it select that item from the combobox. Now I am adding my items to the combobox statically during design time and when I do this, SelectedItem doesn't work and always is null. However I just found out that when I add my combobox items during runtime, selectedItem works just fine. Now I would like to know why this is. I am guessing that it is some binding that automatically happens when adding them dynamically, but I would love to know how to get this working statically. Thanks!
-
Binding to an objects member variable in a Listm_netObjArr is my public global List<> of my NetworkIDObjects: m_netObjArr NetworkIDObjects is an object containing a number of variables that I populate from an XML file. I want to populate my Listbox with the "Name" variable value for each of the NetworkIDObjects in my List and I do have a public accessor for Name. Thanks for your time!
-
Binding to an objects member variable in a ListI am somewhat new to WPF and am loving the data binding, but it seems that I am still having a little bit of a rough time getting some things to work, one being this issue. I currently have an object that has a "Name" member variable as well as a few other member variables which I have made public accessors for. I then poulated a global List of these objects from a tab delimited file. I now have a listbox in my main window that I want to databind to the "Name" variable of each object listed in my List<> of these objects. In my XAML I currently have the below code where m_netObjArr is my global List which for each of my NetworkIDObjects I want to access their "Name" accessor.
<ListBox Height="Auto" Name="lbNetSelect" Width="Auto" MouseRightButtonDown="lbNetSelect_MouseRightButtonDown"
SelectionChanged="lbNetSelect_SelectionChanged" ItemsSource="{Binding ElementName=window1.m_netObjArr, Path=Name }"/>Any help or direction would be great! Thanks everyone!
-
Ribbon Bar - Allow tab to change objects in viewUnsure if anyone will be able to help me here. I have posted in the Syncfusion forums, but they take a while to respond, so I thought I would try my luck here and see if I can get some direction. I am using VS2010 WPF with .Net 4. I also have Syncfusion installed and using their ribbonbar. Now this is going to be an admin tool, where I will have multiple utilities within. I want to use a RibbonBar with a Docking manager below. Now what I am trying to do is have each RibbonTab in the RibbonBar have its own seperate Docking Manager. Then each of my friends will be able to work on their specific tab. Now I was able to write some C# code that captured the tab click event and handled the loading of the different objects into the various docking panes, but this doesn't happen at design time. I was wondering if there is any way I can get this to work at design time, perhaps by using XAML. If anyone has any info that may help I woul love to hear it. I am really new to WPF, so it has taken some getting used to, but I am enjoyin it and perhaps even a kick in the right direction would be helpful. Thanks! Dan
-
VB6 to C# conversion SetIndex issueThanks for the help! Our code is not the same Luc, but I see what you were trying to do so I am going to play with that. I can't thank you enough for the quick response! Thanks again! Dan
-
VB6 to C# conversion SetIndex issueI was wondering if anyone has run into this problem and gotten around it in any way. Currently I am performing a front end conversion from a VB6 GUI to C#. It is quite a big change and therefore we are performing this in stages. Now in this process we currently are using "Microsoft.VisualBasic.Compatibility.VB6" array objects at times eg.RadioButtonArray, CheckBoxArray, etc. Now when using these, there is a "SetIndex" method that is used throughout the existing code and it seems that the designer does not like the idea of this method being called when EndInit has been called already. It essentially renders the designer useless and we get an error in the designer. What we currently do is in the "InitializeComponent" method we call only "BeginInit" on the various arrays, and then in the form constructor after "InitializeComponent" is called we have another method we created called "InitializeComponentArrays" which we call all methods needing to call "SetIndex" and then we call their "EndInit" methods. This allows designer to load everything fine until we make any adjustments to the designer. When this happens, the windows generated code inserts all the "EndInit" methods into the "InitializeComponent" method which causes the designer to crash, and I then need to go in and delete the lines that it has entered. It is quite annoying and I felt it was time to reach out and see if anyone else has any better resolutions. Thanks everyone! Dan