wpf - Activate UIElement on textbox from code behind -


I have a custom WPF keyboard that I use for input in my application

  Xmlns: WpfKb = "clr-namespace: WpfKb.Controls; assembly = WpfKb"  

and resourced in

    

In my XML-code, I use the following code to activate:

    

Now I have to add the code behind it, but I do not know where ro is starting to appear.

  text box channel name = new text box (); ChannelName.Style = (MyView.TryFindResource ("PmEditTextBox") style); ChannelName.Width = 300;  

FloatingTouchScreenKeyboardclass has been defined as

  public partial class FloatingTouchScreenKeyboard: System.Windows.Controls.Primitives.Popup {public static read-only DependencyProperty AreAnimationsEnabledProperty = DependencyProperty.Register ("Animation enabled", typef (boole), typef (floating touch screen screen), new UIPpropy metadata (true)); Public dependency property for stable reading Aiselawardtofedproprti = dependence Proprtikniyntrn ( "Aiseld sweet Fed" Taipf (bool), Taipf (Flotingtucskrinkiboard), New Uaipiprotimatetata (true)); Dependency reversion idragging property = dependency property for public static reading. Registrar ("Isdraiging", typef (boole), typef (floatingtouchchunkenboard), new UIPprotamatitata (false)); Public static DependencyProperty only read IsDragHelperAllowedToHideProperty = DependencyProperty.Register ( "IsDragHelperAllowedToHide", typeof (bool), typeof (FloatingTouchScreenKeyboard), New UIPropertyMetadata (false)); Public static dependencies to read property Aikebaerdshaunproprti = dependence Proprtikniyntrk ( "Iskiboardsoun" Taipf (bool), Taipf (Flotingtucskrinkiboard), New Uaipiproti metadata (true)); Public static read-only dependency property maximum keyboard opcityproperty = dependency credentials. Registrar ("maximum KBBopCity", typef (double), typef (floating touch screen screen), new UIPprotamatData (0.9D)); Public static DependencyProperty only read MinimumKeyboardOpacityProperty = DependencyProperty.Register ( "MinimumKeyboardOpacity", typeof (double), typeof (FloatingTouchScreenKeyboard), New UIPropertyMetadata (0.2d)); Dependency for public static readingPrint keyboardHeightDialPipty = DependencyProperty Registration ("KeyboardHydilele", Typef (Double), Typef (FloatingTouchScreenKeyboard), New UIPProtimatData (5D)); Public static DependencyProperty only read KeyboardHideAnimationDurationProperty = DependencyProperty.Register ( "KeyboardHideAnimationDuration", typeof (double), typeof (FloatingTouchScreenKeyboard), New UIPropertyMetadata (0.5d)); Public static Readonly DependencyProperty KeyboardShowAnimationDurationProperty = DependencyProperty.Register ("KeyboardShowAnimationDuration", typeof (double), typeof (FloatingTouchScreenKeyboard), New UIPropertyMetadata (0.5d)); Public stable read-only dependency deployment DeadZoneProperty = Dependency Property. Controls ("Deadzone", Typef (Double), Typef (FloatingTouchScreenKeyboard), New UIPProtimatData (5D));  

Any suggestion would be appreciated.

Most of the attributes you are setting up are actually the floating keyboard's base class, Popup popup class setter methods can be used to set properties from C # code, for example:

  Popup.SetPlacementTarget (ChannelName, TheGui)  

For the properties of binding, use the target's setting method:

  ChannelName.SetBinding (Popup. OpenOnMouseClickProperty, new binding {path = new property path ("UseOnScreenKeyboard")});  

Looking at the WpfKb project, I do not see any definition for KeyboardType property. Maybe it was present in an earlier version or you might Using a custom / fork version?


Comments