binding

xamarin forms xaml OnPlatform not working on bindings

时光怂恿深爱的人放手 提交于 2021-02-07 21:52:59
问题 <cv:BindableComboBox ItemsSource="{Binding Themes}" SelectedValue="{Binding SelectedTheme}"> <cv:BindableComboBox.Title> <OnPlatform x:TypeArguments="x:String" iOS="{Binding ThemePickerTitle}" Android="{Binding ThemePickerTitle}"/> </cv:BindableComboBox.Title> </cv:BindableComboBox> so I have picker and I want to bind its Title to ThemePickerTitle property. It works well if I write it as inline attrubute. But I dont want to have title on windows. So I write OnPlatform to have it only on Ios

Setting a ViewModel boolean property inside a storyboard

荒凉一梦 提交于 2021-02-07 17:32:52
问题 I have a storyboard that's triggered by a property in the ViewModel, this trigger the animation to start. But how do I set the "Saved" property back to False when it is done with the animation (to trigger the ExitAction.) <Style TargetType="TextBlock" x:Key="FadeInOut"> <Style.Triggers> <DataTrigger Binding="{Binding Saved}" Value="True"> <DataTrigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:1" From="0" To="1" /> <!-- set

Setting a ViewModel boolean property inside a storyboard

﹥>﹥吖頭↗ 提交于 2021-02-07 17:31:06
问题 I have a storyboard that's triggered by a property in the ViewModel, this trigger the animation to start. But how do I set the "Saved" property back to False when it is done with the animation (to trigger the ExitAction.) <Style TargetType="TextBlock" x:Key="FadeInOut"> <Style.Triggers> <DataTrigger Binding="{Binding Saved}" Value="True"> <DataTrigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:1" From="0" To="1" /> <!-- set

Setting a ViewModel boolean property inside a storyboard

╄→гoц情女王★ 提交于 2021-02-07 17:30:16
问题 I have a storyboard that's triggered by a property in the ViewModel, this trigger the animation to start. But how do I set the "Saved" property back to False when it is done with the animation (to trigger the ExitAction.) <Style TargetType="TextBlock" x:Key="FadeInOut"> <Style.Triggers> <DataTrigger Binding="{Binding Saved}" Value="True"> <DataTrigger.EnterActions> <BeginStoryboard> <Storyboard> <DoubleAnimation Storyboard.TargetProperty="Opacity" Duration="0:0:1" From="0" To="1" /> <!-- set

How do you apply a ValueConverter to a convention-based Caliburn.Micro binding Example?

末鹿安然 提交于 2021-02-07 03:25:30
问题 I have seen the following question: how-do-you-apply-a-valueconverter-to-a-convention-based-caliburn-micro-binding. I couldn't post a comment on that topic, so I am posting my question here. How to use the ConventionManager.ApplyValueConverter in Caliburn.Micro for value converters when using convention based binding ? Could anyone write an example here? 回答1: ApplyValueConverter is defined as a static Func<> delegate in the ConventionManager class. In order to provide your own converter in

How do you apply a ValueConverter to a convention-based Caliburn.Micro binding Example?

别等时光非礼了梦想. 提交于 2021-02-07 03:25:18
问题 I have seen the following question: how-do-you-apply-a-valueconverter-to-a-convention-based-caliburn-micro-binding. I couldn't post a comment on that topic, so I am posting my question here. How to use the ConventionManager.ApplyValueConverter in Caliburn.Micro for value converters when using convention based binding ? Could anyone write an example here? 回答1: ApplyValueConverter is defined as a static Func<> delegate in the ConventionManager class. In order to provide your own converter in

How do you apply a ValueConverter to a convention-based Caliburn.Micro binding Example?

故事扮演 提交于 2021-02-07 03:23:01
问题 I have seen the following question: how-do-you-apply-a-valueconverter-to-a-convention-based-caliburn-micro-binding. I couldn't post a comment on that topic, so I am posting my question here. How to use the ConventionManager.ApplyValueConverter in Caliburn.Micro for value converters when using convention based binding ? Could anyone write an example here? 回答1: ApplyValueConverter is defined as a static Func<> delegate in the ConventionManager class. In order to provide your own converter in

Does Binding work ONLY with DependencyProperty?

放肆的年华 提交于 2021-02-06 10:39:07
问题 MSDN says, Each binding typically has these four components: a binding target object, a target property, a binding source, and a Path to the value in the binding source to use. For example, if you want to bind the content of a TextBox to the Name property of an Employee object, your target object is the TextBox, the target property is the Text property , the value to use is Name, and the source object is the Employee object. The target property must be a dependency property. The above excerpt

DependencyProperty does not work if the value is from a binding

▼魔方 西西 提交于 2021-02-05 12:37:29
问题 I created UserControl with viewmodel. It has DependencyProperty which only works if the value is passed directly. If the value is passed through the binding, it no longer works. Here is the view code: This is a closed element not associated with any other. All listed items belong to him. This is a code shortening, I am not going to present whole, immeasurable structures. View public partial class SomeView : UserControl { public SomeView() { InitializeComponent(); SetBinding(ActiveProperty,

DependencyProperty does not work if the value is from a binding

↘锁芯ラ 提交于 2021-02-05 12:34:14
问题 I created UserControl with viewmodel. It has DependencyProperty which only works if the value is passed directly. If the value is passed through the binding, it no longer works. Here is the view code: This is a closed element not associated with any other. All listed items belong to him. This is a code shortening, I am not going to present whole, immeasurable structures. View public partial class SomeView : UserControl { public SomeView() { InitializeComponent(); SetBinding(ActiveProperty,