Questions tagged [template-control]

12 questions
2
votes
1 answer

Create custom Shape Control in UWP (Universal Windows Apps), Windows 10

I want to create a custom Shape control, that paints different shapes like Polygon, Ellipse, Rectangle, etc, depending on some custom properties. I was able to create a custom template control ColorShape like this:
Nekketsu
  • 121
  • 2
  • 12
1
vote
1 answer

XAML Custom control - mathematical fraction

I'm completely new to XAML but not to C# and .NET in general. I'm creating a Windows 8.1 App and I want to create and implement a mathematical fraction control which would represent a structure with numerator and denominator (the first above the…
Aranha
  • 2,903
  • 3
  • 14
  • 29
1
vote
1 answer

Templates in extended Silverlight controls

i am looking to extend a third party control, it is a ComboBox (so it isn't the standard Silverlight one, but that shouldn't matter for this question). To do this, i add a new template control to my controls project, then i change the new control to…
slugster
  • 49,403
  • 14
  • 95
  • 145
1
vote
1 answer

Manipulating Value Converters inside DataTemplate

I have a set of data templates I am using for my custom control. It works well, but I want to be able to bind it to data and have values scale based on the min / max of the set. I have created the following value converter: public class…
1
vote
1 answer

How do I check isPostback in template control?

I'm using a template control in a web application. At the moment, everything OnLoad is happening even if the page is a postback (understandably). How do I access an isPostback property in this method to run the necessary checks, just as I would if…
user1017882
0
votes
2 answers

Bind a click event to a dynamically generated button element in a templated control / template control

I have a templated control in my UWP application which contains a ListView. The ListView is populated in the runtime.
0
votes
1 answer

Manipulation events not triggering on Templated Control [UWP]

I am trying to implement a custom control (Templated Control) for a UWP application for transforming shapes (mostly Rectangle types). Custom control will be implemented in a UWP class library and reference to the main project. What I want to achieve…
0
votes
1 answer

Registering RoutedEventHandler in UWP template control

I'm having difficulty finding how to register a RoutedEventHandler in UWP. I'm attempting to code a template control that has event properties similar to ContentDialog's: PrimaryButtonClick="ClickEvent" Where ClickEvent is defined in the cs file.…
jchristof
  • 2,794
  • 7
  • 32
  • 47
0
votes
1 answer

UWP Interaction.Behavior with Ellipse

In my Template Control, I have a button and a Ellipse. I added click event with Interaction.Behavior. Button work fine. but Ellipse never fire the event. Why ?