I have created an expand all option in my tool. If i use it, it takes 10 secnds to expand everything (the first time). Obviously doing lots under the hood creating the controls and calculations.
Maybe it is that it really takes a lot of time to load the things, and then you might want to think about having it threaded and load peaces at the time (like the old webbrowsers did)
I'm trying to do the equivalent in code of what this xaml does :
<CheckBox x:Name="cb">
<i:Interaction.Triggers>
<ei:DataTrigger Binding="{Binding IsChecked, ElementName=cb}" Value="true">
<ei:ChangePropertyAction PropertyName="Content" Value="blablabla"/>
<...
what I imagine is that my outer view will have some control whose content is dynamic. That control will take up the majority of the space on the form. When a user clicks say, button 1, the content of that control displays view A
Hey all. I have a DataTemplate that contains a datagrid. The datagrid has a DataGridTemplateColumn. Is there any way I can bind something in that templatecolumn to the object the DataTemplate is bound to instead of the row from the datagrid?
Never mind. The Tag property saves the day again.
Solution (for those who were just dying to know): DataGird.Tag = {Binding}
Control inside of DataGridTemplateColumn: CommandParameter={Binding ElementName=myDataGrid, Path=Tag}
@BrandenBoucher any chance you can open source the control you're making + example? you've been putting a lot of time into it, I'm interested in seeing how it all works out
But I will be doing a bit of rework (to clean it up) on that control I was making. I'll actually have to check with my company, but I would love to open source it.
For the most part. It works pretty well. I just think the way I am handling some stuff is a bit kludgy in the code-behind for the control. Nothing that can't be fixed though.
The code was just kinda thrown together without a better knowledge of the details/gotchas so fixes were just put into place. I'd rather have the code set up to handle those details intrinsically
I am working on a medium size WPF application that utilizes the MVVM pattern. ViewModels use INotifyPropertyChanged to refresh their respective Views.
This approach works perfectly, except for one problem: when this application is left running for long periods of time (3-7 days) the Views (every...
So let's say in the code behind, you had some logic that went through the list of columns in your dg and matched the friendly column name to the actual column name
I do agree that if I wanted to have a combo box that listed out these columns, I could hard-code the list of columns in the combo box AND in the datagrid. But if I made a change to the datagrid's columns, I would have to make sure I changed the hard-coded list for the combo box as well.
@JohanLarsson I would NEVER do that because it's part of the view logic and could be completely different from what you end up naming your columns in your view.
(obviously, NEVER, is a lie. But I would do whatever I could not to)
OK... so for now I am going to say never mind and pretend my problem wasn't because I was being an idiot and not realizing the error was coming from a different control...