windows runtime - Custom Control Code Behind (winRT XAML C++)? -


i creating custom control. idea use 4 sliders set rgba values , rectangle display resulting color. have created dependency property color result can bind it. working far. don't understand how combine 4 slider results single color value. know how this, not it. there doesn't seem code behind custom controls. implement logic custom controls? missing here? thanks.

you need override onapplytemplate method , call gettemplatepart each template part control , store these in private fields. add dependency properties each of rgba channels , maybe use templatebinding bind slider values properties. in callbacks of dependency properties set color property value.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -