xaml-binding

How to bind one texblock value to other textblock one way and get value in MVVM

筅森魡賤 提交于 2021-02-11 07:04:10
问题 Let me explain my question by an Image I have MVVM structure in My project. I have two textblocks, Textblock 1 and textblock 2 . Now I want textblock2's Text same as Textblock1's Text, whenever Textblock1's Text changed. but I should be able to set Textblock2's Text different from Textblock1's . So I am setting Oneway binding of Textblock1's Text Property. How Can I get the Text property of Textblock2's In MVVM. If I create a property for Textblock2's Text property, I wont be able to bind

How to bind one texblock value to other textblock one way and get value in MVVM

扶醉桌前 提交于 2021-02-11 07:02:40
问题 Let me explain my question by an Image I have MVVM structure in My project. I have two textblocks, Textblock 1 and textblock 2 . Now I want textblock2's Text same as Textblock1's Text, whenever Textblock1's Text changed. but I should be able to set Textblock2's Text different from Textblock1's . So I am setting Oneway binding of Textblock1's Text Property. How Can I get the Text property of Textblock2's In MVVM. If I create a property for Textblock2's Text property, I wont be able to bind

WPF TabItem - Image Binding

半城伤御伤魂 提交于 2019-12-24 01:57:14
问题 Issue I am trying to bind an Image from my TabItem to my TabControlResource section but I cannot seem to do this. The Header text is fine as the TabItem has a Header attribute but there is nothing I can add my image to. Code Here is the whole of my TabControl code: <TabControl Margin="10" BorderBrush="#c83620" BorderThickness="4" Background="#e37e6e" FontFamily="Segoe UI" FontSize="14" > <TabControl.Resources> <Style TargetType="TabItem"> <Setter Property="Template"> <Setter.Value>

Wpf custom datepicker user control

ぐ巨炮叔叔 提交于 2019-12-20 05:55:29
问题 I want to create a user control for getting a date from the user. It should have three textboxes, one for year, month and day. I don't know how to create it. <UserControl x:Class="UI.WPF.CustomControls.ChooseDateControl" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" mc:Ignorable="d" x:Name