multitrigger

WPF TextBox.Text with MultiBinding

▼魔方 西西 提交于 2019-12-22 04:43:34
问题 I've got Custom Control with a TextBox in the default Template. The Custom Control has these 2 dependency properties (among others): SelectedValue, NullText (text to appear in the TextBox when nothing is selected and the value is provided) I'd like to set the TextBox.Text with the NullText value when the SelectedValue null is and the NullText not null is. <TextBox.Text> <MultiBinding Converter="{StaticResource myConverter}"> <Binding RelativeSource="TemplatedParent" Path="SelectedValue"/>

Only the last MenuItem gets the Icon

我的梦境 提交于 2019-12-13 01:37:32
问题 I know there are other threads about this but in my case its a bit different. I like to use an icon from a separate resource assembly <MultiTrigger> <MultiTrigger.Conditions> <Condition Property="IsCheckable" Value="true" /> <Condition Property="IsChecked" Value="true" /> <Condition Property="Role" Value="SubmenuItem" /> </MultiTrigger.Conditions> <Setter Property="Icon"> <Setter.Value> <Image Margin="1,0" Width="16" Source="pack://application:,,,/MyResourceAssembly; component/Resources

MultiDataTrigger Binding to Collection and To a property within the collection

喜夏-厌秋 提交于 2019-12-11 13:24:10
问题 I have the following XAML: <Style.Triggers> <MultiDataTrigger> <MultiDataTrigger.Conditions> <Condition Binding="{Binding Path=Errors, Converter={StaticResource ErrorsCountConverter}}"> <Condition.Value>True</Condition.Value> </Condition> <Condition Binding="{Binding Path=Errors[0].HasError}" Value="True" /> </MultiDataTrigger.Conditions> <Setter Property="Background" Value="Red" /> </MultiDataTrigger> </Style.Triggers> Errors is a ObservableCollection<BrokenRule> . The BrokenRule has a

Grails - Parameter in a Quartz job Trigger

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 10:14:10
问题 I have the following quartz job, set via Quartz-plugin: class UserMonthlyNotificationJob { static triggers = { cron name:'dailyTrigger', cronExpression: " ... " cron name:'weeklyTrigger', cronExpression: " ... " cron name:'monthlyTrigger', cronExpression: " ... " } def execute(){ ... } } I would like to be able to set a parameter in the trigger that would be available in the execute block. It seems I can not set any variable in a cron trigger , and a custom trigger require to implement the

Grails - Parameter in a Quartz job Trigger

只愿长相守 提交于 2019-12-06 03:21:14
I have the following quartz job, set via Quartz-plugin: class UserMonthlyNotificationJob { static triggers = { cron name:'dailyTrigger', cronExpression: " ... " cron name:'weeklyTrigger', cronExpression: " ... " cron name:'monthlyTrigger', cronExpression: " ... " } def execute(){ ... } } I would like to be able to set a parameter in the trigger that would be available in the execute block. It seems I can not set any variable in a cron trigger , and a custom trigger require to implement the Quartz Trigger interface , which I do not know how to do. Any help greatly appreciated. Make your job

WPF: Condition Binding versus Property, XamlParseException using either

对着背影说爱祢 提交于 2019-12-01 17:27:14
问题 I'm having trouble with a Condition for a MultiTrigger . If I do the following: <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type ListView}}}" Property="IsEnabled" Value="True"/> Then I get this exception: Condition cannot use both Property and Binding. Error at object 'System.Windows.Condition' in markup file However, when I do the following: <Condition Binding="{Binding RelativeSource={RelativeSource AncestorType={x:Type ListView}}, Path=IsEnabled}" Value=

MultiDataTrigger vs DataTrigger with multibinding

戏子无情 提交于 2019-11-30 06:14:34
I encountered a situation where I can easily achieve the same functionality by using a MultiDataTrigger or, alternately, using a DataTrigger with a MultiBinding . Are there any substantive reasons to prefer one approach over the other? With MultiDataTrigger: <MultiDataTrigger> <MultiDataTrigger.Conditions> <Condition Binding="{Binding Path=SomePath}" Value="SomeValue"/> <Condition Binding="{Binding Path=SomeOtherPath, Converter={StaticResource SomeConverter}}" Value="SomeOtherValue"/> </MultiDataTrigger.Conditions> <MultiDataTrigger.EnterActions> <BeginStoryboard Storyboard="{StaticResource

MultiDataTrigger vs DataTrigger with multibinding

为君一笑 提交于 2019-11-29 04:59:17
问题 I encountered a situation where I can easily achieve the same functionality by using a MultiDataTrigger or, alternately, using a DataTrigger with a MultiBinding . Are there any substantive reasons to prefer one approach over the other? With MultiDataTrigger: <MultiDataTrigger> <MultiDataTrigger.Conditions> <Condition Binding="{Binding Path=SomePath}" Value="SomeValue"/> <Condition Binding="{Binding Path=SomeOtherPath, Converter={StaticResource SomeConverter}}" Value="SomeOtherValue"/> <