locked
custom rendering of components RRS feed

  • Question

  • I am new to XAML an c# but i have some experience in Java Swing. I have VS-2012 for windows 8 that makes the development of apps easy but i want to know how i can get full control of rendering some components, like in java one has to extend JPanel and provide the rendering code in paintComponent().How can i do something related in XAML where UI and logic is so much separated?
    Sunday, November 18, 2012 9:42 AM

Answers

  • Hi Pankaj,

    What project did you create? Did you want to learn wpf?

    Here is an Introduction to WPF you can refer to:

    http://msdn.microsoft.com/en-us/library/aa970268.aspx

    If you have any concerns about this issue, please feel free to us know.

    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Ego Jiang Tuesday, November 27, 2012 9:57 AM
    Monday, November 19, 2012 8:12 AM
  • This isn't really related to VS extensibility. In short you rarely should have to override custom painting in WPF, instead you apply styles or templates. If you DO have to do custom painting then you would override UIElement.OnRender. That said I have written a fair amount of WPF code and have VERY rarely needed to override OnRender, you shouldn't jump to that as your first solution.

    Ryan

    • Marked as answer by Ego Jiang Tuesday, November 27, 2012 9:57 AM
    Monday, November 19, 2012 8:39 PM

All replies

  • Hi Pankaj,

    What project did you create? Did you want to learn wpf?

    Here is an Introduction to WPF you can refer to:

    http://msdn.microsoft.com/en-us/library/aa970268.aspx

    If you have any concerns about this issue, please feel free to us know.

    Best regards,


    Ego [MSFT]
    MSDN Community Support | Feedback to us

    • Marked as answer by Ego Jiang Tuesday, November 27, 2012 9:57 AM
    Monday, November 19, 2012 8:12 AM
  • This isn't really related to VS extensibility. In short you rarely should have to override custom painting in WPF, instead you apply styles or templates. If you DO have to do custom painting then you would override UIElement.OnRender. That said I have written a fair amount of WPF code and have VERY rarely needed to override OnRender, you shouldn't jump to that as your first solution.

    Ryan

    • Marked as answer by Ego Jiang Tuesday, November 27, 2012 9:57 AM
    Monday, November 19, 2012 8:39 PM
  • Actually i have created a small library for mathematical computations and symbolic calculus. A graph representing the expression(Function) is created.I want the expression to be displayed on the screen in a more formatted way, like integration symbols,and in a more traditional format.I can see no other option than completely parsing the graph and rendering the expression on the screen.I have already created a similar program in java,where a subclass of JPanel acted as a display for output.I want to do somethig similar in c#,using Xaml for windows 8.I have done some experimental coding in Windows Forms using C#.
    Tuesday, November 27, 2012 12:25 PM