-
please i hope someone can help with this as it has cost me 3 days and i'm stumped. I cant seem to get the annotatedscrollbar labels text to appear. the control is connected to the ItemsView and it scrolls correctly i am using C++, latest SDK 1.7 at the time of writing. i create the label like this:
the collection shows the item, and i can add a datatemplate like this, and it shows the label object name as a label
if i change to this: {Binding Content}"... then i see no text. i can run debug output at all times on the collection and label is there and correct in the object, it just doesnt show the text. the c# sample looks pretty simple, it parses a string in. here i have to put an IInspectable in and it just doesnt render it. removing the datatemplate doesnt help. can someone please confirm the barebones to make this show labels because this seems like its way more complex than it should be. if the documentation or source gives this information away and i'm missing it, please point me to the error of my ways so i can understand better in the future :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
always work it out after i've posted. i should just start by posting! anyways, this still feels overkill, i had to use a converter, but it works with this datatemplate assigned:
once i used x:bind instead of binding it complained about hstring constructors which was a clue, so i had to use a converter: `
` am i still missing something though, should it be this complicated? |
Beta Was this translation helpful? Give feedback.
always work it out after i've posted. i should just start by posting!
anyways, this still feels overkill, i had to use a converter, but it works with this datatemplate assigned:
<DataTemplate x:Key="AnnLabelTemplate" x:DataType="controls:AnnotatedScrollBarLabel"> <Border Padding="6,2"> <TextBlock Text="{x:Bind Content, Converter={StaticResource InspectableToStringConverter}}" Foreground="{ThemeResource SystemControlForegroundBaseHighBrush}" FontWeight="SemiBold"/> </Border> </DataTemplate>
once i used x:bind instead of binding it complained about hstring constructors which was a clue, so i had to use a converter:
`
winrt::Windows::Foundation::IInspectable InspectableToStringConverter::Con…