Advanced Forum Search Results
-
Thank you both for your replies. Yes, I have seen this method of creating the dataTemplate. I'm a little surprised that there isn't a better way of doig this than to build a xaml string in order to do so.
I could use this in method in my project, but the code would be too long and ugly. I'll see if I can find a workaround for the time ...
-
Does anyone know how I can create a datatemplate from code and set it's visual tree?
This is what I'm doing now.
DataTemplate template = new DataTemplate();
What I would like to do is now defien the visual tree of the template ... template.visualTree = new Button() {Content = "test"}); -- as an example.
My intent is to ...
-
I have run into the same situation. It doesn't seem like a good design to force developers to manage the state of that checkbox ourselves. Why force us to keep track of wether we selected a particular record or not by adding a property to the object? All I want to do is list my records and be able to select some of them in order to perform ...
-
Does anyone know of a way to set the headers of a datagrid manually? I know I can set the ColumnHeader style in xaml, but what I want to do is set the header individually for each column. For example... for column 0 I want the header to be an image, for column 1 I want the header to be a textblock and for column 2, I want it to be a stack ...
-
I hadn't looked at it like that before. You're right. I am looking for the behavior of a listbox. I will look try to implement it that way and see if this solves my issue.
Thanks. I'll keep you posted.
-
That doesn't really work in my case. Here is the xaml. when I click, the event is pickd up by a GridCellControl. It's parent = null. Any other thoughts?
Thanks
<cnt:DataGridTemplateColumn> <cnt:DataGridTemplateColumn.CellTemplate> ...
-
Ok. Here is my scenario.
I have an itemsControl (AitemsControl). I set AitemsControl's ItemsSource to a collection of Aobject objects. In the xaml, I define the datatemplate for that ItemsControl. So each Aobject is displayed with a class I call Aviewer. This class catches a click event. When the Aviewer object is clicked, I want to ...
-
That's exactly what I was missing. Thank you!
-
You could always use a textbox instead of a textblock and just make it look like a textblock. Just set IsHitTestVisible = false and remove the border. This is not the most elegant solution, but it would get the job done. I believe ccoombs's solution would work as well.
-
I have created a custom panel wich lays out items much like what you see in Windows Vista's Flip 3D (alt+tab). I added several dependency properties to control the spacing between items and other visual properties. I now am trying to create a sample application which contains that custom panel with several items and several controls ...