Hello
I have a UserControl that I have successfully been using as a header for presentations that involve a list which can be headered, using the xaml below:
<DockPanel >
<uc:ListSubjectHeader Subject="{Binding DisplayName}"
AddNewItemCommand="{Binding AddCommand}"
ImageSource="...
Preview
On the highlighted item, the images still ordered vertically even I already use <StackPanel Orientation="Horizontal">. Am I missing something?
I don't want the images have ListBoxItem behavior (hover/click). I had added IsEnabled="False" to the list box, but the images' opacity decreased : ( Do you have any idea how to do thi...
In my Master/detail scenario, I have a datagrid as master and a UserControl as child.
When a particular Row being selected in master grid I assign it to the UserControl's DataContext.
In my User Control I have couple of DataTemplates as Resources and ContentControl as the Child Container. What I'm struggling with is how to dynamically se...
I am trying to access Control using ElementName from DataTemplate that is used in different UserControl (Resources) than defined (in xaml).
Imagine this situation:
MyUserControl.xaml with following DataTemplate in resources:
<UserControl.Resources>
<DataTemplate x:Key="SomeTemplate">
<TextBlock Text="{Binding Text, ElementNam...
Hi !
I use a listview to display data like a data matrix (columns and rows). My problem is : my items are typed : MatrixCellVM.
I tried everything I found on the net to apply a DataTemplate on this items but nothing worked.
Here is the latest technique I'm using
foreach (var col in dataMatrix.Columns)
{
//create th...
I have a ContentControl bound to a PhoneNumber object, and the control's Style.Triggers applies different ContentTemplates when the control has or doesn't have keyboard focus.
<Setter Property="ContentTemplate" Value="{StaticResource DisplayPhoneNumberDataTemplate}" />
<Style.Triggers>
<Trigger Property="IsKeyboardFocusW...
I have these ViewModels: RecordViewModel, ComponentViewModel where RecordViewModel essentially is a container for several ComponentViewModels.
The display of these ViewModels is currently handled by DataTemplates that look something like this:
<DataTemplate DataType="{x:Type vm:RecordViewModel}" >
<ItemsControl ItemsSource={Binding...
Fairly new to WPF...
I have a collection of data I would like to bind to a grid panel. Each object contains its grid row and column, as well as stuff to fill in at the grid location. I really like how I can create data templates in the listbox XAML to create a UI with almost nothing in the code behind for it. Is there a way to create...
I have HeaderedItemsControl which ItemsSource is bound to a ObservableCollection<Person>. I would like to display it's content like:
*Name* Müller Schmid Weber
*FirstName* Peter Hans Willhelm
*Age* 32 56 78
*Country* Switzerland Austria Liechtenstein
My xaml-Code so far:
<Heade...
Hi,
I'm trying to create DataTemplates for a PropertyCollection (of PropertyDescriptors) to display the items in the collection in this format,
descriptor1 > descriptor2 > descriptor3 > descriptor4 > descriptor5
Each descriptor would be a link (using Hyperlink), my question is can I do this with Labels (which is not an ItemsControl ho...
Hi,
I need to display xaml code in a panel, how do I write DataTemplates to format the xaml with proper indentation and hyperlinks for references (such as StaticResource etc), for example,
<ListBox ItemsSource="{Binding}" ItemTemplateSelector="{StaticResource ResourceKey=selector}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
...
I am in little trouble with this problem.
I have made a DataGrid and it have DataTemplate Columns. here is the XAML for that
<data:DataGrid x:Name="PortsGrid" Height="124" Margin="23,0,17,2" VerticalAlignment="Bottom" ItemsSource="{Binding PortsGridData, Mode=TwoWay}" AutoGenerateColumns="False" SelectionMode="Single">
<data:Dat...
'ContentTemplate' is a DataTemplate that displays an object which has a member 'FooList' (an ObservableCollection).
<DataTemplate x:Key="ContentTemplate">
<ListBox ItemsSource="{Binding Path=FOO}">
...
</ListBox>
</DataTemplate>
I need to be able to filter that FooList using a CollectionViewSource. This is usually been...
Hi,
I have custom server control contains templatefield when an out button clicked the field disappear , when can I rebind the control (inside its class) supposed that Control.Page.OnInit+=new EventHandler(rebind()) doesn't do any things ?
...
I have XML in the following format:
<Products>
<Product name="MyProduct1">
<Components>
<Component name="MyComponent1">
<Teams>
<Team id="1"/>
<Team id="4"/>
</Teams>
</Component>
</Components>
</Product>
</Products>
This is stored in an external XML file that is included via...
I need to change the DataTemplate of my ListBox, based on the ListBox items count. I have come up with the following XAML:
<Window.Resources>
<DataTemplate x:Key="DefaultTemplate">
<StackPanel Orientation="Horizontal">
<TextBlock Text="{Binding Path=Text}"/>
<TextBlock Text="default template" />
</StackPanel>
</DataTem...
I'm a bit of a .net newbie and I've been working on my first big silverlight project. So pardon the lack of lingo and the length of the question. But my problem is as follows.
The project is being built according to the MVVM pattern ( in this case I'm using LightMVVM ). Most of the views contain ListBoxes. These listboxes need to ha...
Hi,
I'm doing a generic controller, right now is one button from telerik with two direferents datatemplates. Each dataTemplate has an specific key to id and in code-behind i change between them.
My problem is i cannot do the binding to my properties. For example:
My Xaml looks like:
<telerik:RadButton x:Class="Itim.Framework.Silv...
I have the following XAML:
<ComboBox Height="23" HorizontalAlignment="Left" Grid.Row="6" Grid.Column="2"
Name="cbo_team" VerticalAlignment="Top" Width="148"
DataContext="{Binding ElementName=cbo_component, Path=SelectedItem}"
SelectedIndex="0">
<ComboBox.ItemsSource>
<Binding XPath="Teams/Team/@...
I have not been able to find a clean solution to the following problem even though there are a few related questions already on SO.
If I have a data template that is being used multiple times, for example, a TreeViewItem.HeaderTemplate, how can I change something the template for only some of the TreeViewItems.
For example, let's say m...