Tagged Questions

Data templating is a feature of WPF that lets you completely redefine the way a control looks and acts. This example use a DataTemplate to redefine a ListBox item into a Panel with 3 textboxes <ListBox Width="400" Margin="10" ItemsSource="{Binding Source={StaticResource ...

learn more… | top users | synonyms

1
vote
0answers
13 views

How to right-align content in a DataTemplate?

I have a List with a DataTemplate that shows the text and a "x" button next to it. I want the "X" btn to be shown at the extreme right, so they all appear in same place. The XML I use is : ...
0
votes
1answer
24 views

ContentControl with DataTemplateSelector - help needed

I got an enoying problem... Maybe someone can (please!) help. I am using a model that has and enumeration of types and a property that should hold UI models for each selected type from enumeration: ...
0
votes
0answers
27 views

Adding a event to DataTemplate of a ItemsControl.ItemTemplate

I am fairly new to WPF and I am having trouble building a custom control. How it is set up is I have a breadcrumb bar that contains a list of breadcrumb buttons. These buttons are made from ...
0
votes
0answers
14 views

Toolbar in DataTemplate

Is it possible to define a toolbar via data template and than add it to a toolbartray? In a resource dictionary I have this data template: <DataTemplate DataType="{x:Type ...
0
votes
1answer
29 views

How do i bind a ListViewItem to Grid?

How do i bind a grid to ListViewItem's content in Listview datatemplate, Like this: <ListView ItemsSource="{Binding AListInMyViewModel}"> <ListView.View> <GridView > ...
0
votes
1answer
24 views

Access named item inside ItemTemplate

I have the following scenario: <Button Click="ClickHandler">Click Me</Button> <TextBox x:Name="MyInputTextBox" /> <ItemsControl ItemsSource="{Binding}"> ...
0
votes
1answer
26 views

Silverlight phone Update a button in Datatemplate that is bind to listbox

<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0"> <Grid.Resources><DataTemplate x:Key="mDataTemplate"> <Button BorderBrush="#FF767171" Margin="10,10,0,0" ...
1
vote
1answer
29 views

Template property of type ControlTemplate accepts both 'DataTemplate & ControlTemplate' in style?

Why are we able to assign either of DataTemplate or ControlTemplate to the Template property which is of type ControlTemplate in the below markup:- <Style TargetType="ListBox"> <Setter ...
0
votes
2answers
21 views

How do I create a WPF DataGrid Text + Button Column?

I want a column in my datagrid to display both text and a small ellipsis "..." button - similar to what you see in the Visual Studio property grid. Here is a mockup of the datagrid column I'm trying ...
0
votes
1answer
29 views

Close context menu for Databound items in WP7

I have listbox in my WP7 that uses the below DataTemplete to display the list items <DataTemplate x:Key="MetaDataTemplate"> <Grid Width="440" Margin="4,12,0,12"> ...
0
votes
0answers
28 views

How to display image in DataTemplate based on 2 bound properties on object

Im binding a list to my User object ObservableCollection, so it automatically updates. Im using a template to display the user Name but I also want to display an image icon next to the name depending ...
1
vote
3answers
68 views

DependencyProperty validation is not called from data template (only in .NET 4.0)

There is a problem in .NET 4.0, which does not exist in 3.5 (have not tested earlier or later frameworks). I have created a demo user control, which has only a single property Num (of type Integer): ...
0
votes
0answers
35 views

WPF DataTemplate inside ItemsControl

I am using i use a this class to create a multiseries visifire chart: public class MultiChart : Visifire.Charts.Chart { #region SeriesSource (DependencyProperty) public IEnumerable ...
0
votes
0answers
22 views

Event control in resource dictionary using silverlight 5

Hello i have got a editor page (navigation:Page ) this file is editor.xaml, and the code behind is editor.xaml.cs. I've got a bigger data template with mouse enter and mouse leave event. But this ...
0
votes
1answer
29 views

Populating a panel with selected items from a grid in WPF

I have a DataGrid with a bunch of rows representing items in my system. I want that each time a user selects an item in the grid (the user is allowed to select multiple items) the item will be added ...

1 2 3 4 5 59
15 30 50 per page