I am working on desktop application i got suggestion to use wpf instead winforms. I want to go to another form/window when i click my label but i cant find click event for label and textblock? also can anyone tell me what is left mouse up event used for?
Labels usually support single line text output while the TextBlock is intended for multiline text display. For example in wpf TextBlock has a property TextWrapping which enables multiline input; Label does not have this.
The TextBlock control provides flexible text support for UI scenarios that do not require more than one paragraph of text. It supports a number of properties that enable precise control of presentation, such as FontFamily, FontSize, FontWeight, TextEffects, and TextWrapping.
There are 23 Controler and 30 above Event are there in Wpf Controler are :- Button,Calendar,CheckBox,ComboBox,ContextMenu,DataGrid,DatePicker,Dialogs,GridView,Image,Label,ListBox,Menus, PasswordBox,Popup,ProgressBar,RadioButton,ScrollViewer,Slider,TextBlock,ToggleButton,ToolTip,Window,3rd Party Controls.
also can anyone tell me what is left mouse up event used for?
It can for example be used to handle the click of a TextBlock
like you want:
<TextBlock Text="..." MouseLeftButtonUp="TextBlock_MouseLeftButtonUp" />
This event occurs when the left mouse button is released while the mouse pointer is over this element as stated in the documentation: https://msdn.microsoft.com/en-us/library/system.windows.uielement.mouseleftbuttonup(v=vs.110).aspx
You could also handle the MouseLeftButtonDown
event: https://msdn.microsoft.com/en-us/library/system.windows.uielement.mouseleftbuttondown(v=vs.110).aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With