Sign in to follow this  
athono

How is IXRTextBlockPtr used?

Recommended Posts

How is IXRTextBlockPtr used?

I have a XAML file that is made by Expression Blend. But the Silverlight project that corresponds to it has to be in C++ instead of C# (it has something to do with being part of an embedded system).

The automatically gernerated C++ code referrs to the TextBlock code in the header file like this:

[code]IXRTextBlockPtr m_pFoo; // <TextBlock x:Name="Foo">[/code]So how do I assign a value to the text block such that it appears in the window defined in the XAML?

Share this post


Link to post
Share on other sites
[quote name='athono' timestamp='1302488275' post='4796909']
How is IXRTextBlockPtr used?

I have a XAML file that is made by Expression Blend. But the Silverlight project that corresponds to it has to be in C++ instead of C# (it has something to do with being part of an embedded system).

The automatically gernerated C++ code referrs to the TextBlock code in the header file like this:

[code]IXRTextBlockPtr m_pFoo; // <TextBlock x:Name="Foo">[/code]So how do I assign a value to the text block such that it appears in the window defined in the XAML?


[/quote]

I believe the answer can be found [url="http://msdn.microsoft.com/en-us/library/ee502812.aspx"]here[/url]. In order to find such an answer you need to determine what property of the TextBlock you are changing. I believe that from "assign a value to the text block such that it appears in the window defined in the XAML" you are talking about the text property.

IXRTextBlockPtr is a smart pointer, so then you should be able to do something like this: m_pFoo->SetText(L"Test");

I am assuming here that m_pFoo is correctly assigned.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this