dex3703
dex3703

Reputation: 2107

Source code for WinRT UI controls publicly available?

Is the source for Windows Store (WinRT) UI controls publicly available? We would like to extend some of the controls and not have to start completely from scratch, like we can for SL and WPF. Googling and looking through SO doesn't turn up anything for Windows 8.

Thanks!

Upvotes: 2

Views: 919

Answers (1)

Jerry Nixon
Jerry Nixon

Reputation: 31823

So unlike WPF, [WinRT-XAML] controls are written in C++/CX.

But, it sounds not so much like you want the source code as much as you want to derive from existing controls and extend or override their functionality. You know you can do this, right? It's easy enough and sounds like you will get the results you are asking in your question.

Something like this:

public class MonkeyTextBox : TextBox
{
    public new string Text
    {
        get
        {
            return "Always Monkeys!";
        }
        set { /* do nothing */ }
    }
}

This is my custom TextBox wherein I have replaced the base implementation of Text with my own. Granted, I hope your custom controls are better. Anyway, you can do this with almost every control, and you can add your own properties and events. Make sense?

Reference: http://blog.jerrynixon.com/2013/01/walkthrough-custom-control-in-xaml-isnt.html

But to answer your question: no, we have not released the source (yet). Hopefully, that will save you the time looking for it. Maybe someday we will - maybe.

Best of luck!

Upvotes: 3

Related Questions