hello,
i've got two comboboxes with the same content. the user should not be allowed to choose the same item twice. therefore the comboboxes' contents (= selectedindex?) should never be equal.
my first attempt was to comapare the selectedindex with a datatrigger to show/hide a button:
<DataTrigger Binding="{Binding ElementName=comboBo...
Hello, I hope you can help me,
I have a problem with WPF DataBinding in a FlowDocument. Here's a short description what I want to do: My aim is to print or export a XPS-Document which is build from a FlowDocument. In the FlowDocument I set some XML-Bindings which should represent the content of the XMLNode.
In my XMLSource i'm storing v...
I want to change the background color of our apps main window when a property changes. We have a business date that can be changed and I want to change the window background when it has changed from expected. I've set up a property to tell this. But can I set a style datatrigger on a window that changes itself? Or would I need to do ...
I have the following xaml:
<DockPanel>
<DockPanel>
<CheckBox IsChecked="{Binding Path=Test}" />
<CheckBox IsChecked="{Binding Path=Test}" />
</DockPanel>
<DockPanel DockPanel.Dock="Left" Width="10" Background="Blue">
<DockPanel.Style>
<Style>
<Style.Triggers>
...
Is there a way to do a comparison on object type for a trigger?
<DataTrigger Binding="{Binding SelectedItem}" Value="SelectedItem's Type">
</DataTrigger>
Background: I have a Toolbar and I want to Hide button's depending on what subclass is currently set to the selected item object.
Thanks
...
Is there a way to define an animation somewhere in xaml (eg. as a resource) once and then reuse it multiple times? I have a lot of independent brushes across differnt datatemplates that independently need to start the same kind of animation based on a datatrigger. Now since it seems that an animation has to define an Storyboard.TargetNam...
I currently have a listbox that has its selected item bound to a property on my ViewModel. Whenever the selected item isn't null I want to perform an animation on it. However I keep getting the following error "Cannot freeze this Storyboard timeline tree for use across threads" and from research sort of understand why this is happenin...
I have a WPF Datatemplate that contains a some DataTriggers that start animating the color of a visual. How can I start the animation beginning with the actual value the color propery currently has?
Since there might be another animation currently acitve I can not start a new one but when I remove the animation using DataTriggers ExitAct...
How can I remove a storyboard in XAML (i.e. RemoveStoryboard action in a DataTrigger) but keep the value that was animated. Similar to the Animatable.BeginAnimation:
If the animation's BeginTime is null, any current animations will be removed and the current value of the property will be held.
...
I have created an attached property to extend a Button class with additional state:
<Button v:ExtensionHelper.OperationMode="{Binding MyObject.OperationMode}" Command="{Binding MyObject.Select}" Style="{StaticResource operationModeControlTemplateStyle}" />
Then I want to acces this value in the controltemplate using Datatriggers like ...
I have a ListBox. Now I want to write a DataTemplate in such way, that the first item will have red background and white background for other items. I guess I need to write a DataTrigger, but I have no idea how do determine that DataTemplate is applying to the first item.
...
I have a combobox bound to a ViewModel property called "Property".
"Property" is a TypeDescriptor.
When user changes value in combobox the "Property" is updated.
On the UI i would like to either hide or make visible different controls: textbox, combobox, date picker etc.
Problem is datatrigger is not working as expected.
<Style x:Ke...
I've been having trouble using a value converter with a data trigger. In some of my code it seems like the DataTrigger's Path is being applied to the root element, rather than the element which the style applies to.
I created a simple test case, and I don't understand its behavior. I'm expecting the Button to turn red or blue depending ...
Hey
I have an Ellipse defined as so
<Ellipse Stroke="#FF474747" Style="{StaticResource SelectedTemplate}" Fill="{StaticResource RedGradient}" />
I also have two styles setup like so
<RadialGradientBrush x:Key="RedGradient" GradientOrigin="1,1">
<GradientStop Color="White"/>
<GradientStop Color="Red" Offset="1"/>
</RadialGrad...
I have ListView with binding on ObservableCollection which has INotifyPropertyChanged implemented. When user open window, data will be displayed but I want to change backgorund on cells where data was changed in meanwhile...
I have been trying with Data triggers, but they can be triggered just on certain values. I want to trigger when v...
I have the following data trigger on the ListBoxItems in my Multi-selection ListBox
<DataTrigger Value="True">
<DataTrigger.Binding>
<MultiBinding Converter="{StaticResource DisableWorkItemConverter}">
<Binding ElementName="MainForm" Path="PickedWorkItemID"/>
<Binding Path="Id"/>
</MultiBindin...
Hi all, my problem is here:
I have some class
public class Component
{
...
private ServiceController service;
...
public int ServiceStatus
{
get
{
switch(service.Status)
{
case ServiceControllerStatus.Stopped:
return 0;
case...
I have a custom dependency property that I would like to use as a data trigger. Here is the code behind:
public static readonly DependencyProperty BioinsulatorScannedProperty =
DependencyProperty.Register(
"BioinsulatorScanned",
typeof(bool),
typeof(DisposablesDisplay),
new FrameworkPropertyMetadat...
I have a style which toggles the visibility of an image depending on an underlying DataContext property. Unfortunately I keep getting an error:
'Must specify both property and value for setter'
The XAML looks like
<Style TargetType="{x:Type igDP:LabelPresenter}" x:Key="BuySellLabelStyle">
<Setter Property="Template">
...
Blend supports displaying the graphical representation of a style resource, and allows you to select an active property/event trigger to view or modify. However, it's a common occurrence to have visual elements controlled by DataTriggers. Is it possible to tell the designer that it should consider a DataTrigger 'active' so that its visua...