Jump to content



How is IXRTextBlockPtr used?

  • You cannot reply to this topic
1 reply to this topic

#1 athono   Members   -  Reputation: 114

Like
0Likes
Like

Posted 10 April 2011 - 08:17 PM

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:

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



Ad:

#2 shadowisadog   GDNet+   -  Reputation: 439

Like
0Likes
Like

Posted 10 April 2011 - 09:51 PM

View Postathono, on 10 April 2011 - 08:17 PM, said:

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:

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



I believe the answer can be found here. 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.






We are working on generating results for this topic
PARTNERS