Silverlight 응용 프로그램이 있습니다.ElementName 바인딩 도구 설명
나는 작동하지 않는가 elementName과 기타 요소 (A의 GridView)
<ToolTipService.ToolTip>
<ToolTip>
<TextBlock x:Name="Test"
VerticalAlignment="Center"
FontSize="12"
Margin="10,0,0,0"
Foreground="DimGray"
Visibility="Visible">
<Run Text="{Binding Path=Items.Count,
ElementName=SearchResultsPresenter,
StringFormat=\{0:N0\}}"/>
<Run Text="{Binding
Source={StaticResource PublicResourceStrings},
Path=ResourceStrings.SEARCH_RESULTS_DISPLAYED}"/>
<Run Text="{Binding SelectedItems.Count,
ElementName=SearchResultsPresenter,
StringFormat=\{0:N0\}}"/>
<Run Text="{Binding
Source={StaticResource PublicResourceStrings},
Path=ResourceStrings.SEARCH_RESULTS_SELECTED}"/>
</TextBlock>
</ToolTip>
</ToolTipService.ToolTip>
그러나 바인딩에 대한 정보를 표시하는 TextBlock의에 툴팁을 추가해야합니다. Items.Count 및 SelectedItems.Count 표시 "0"...
나는 this을 찾았지만 조금 복잡해 보입니다. 필요한 것을하기위한 간단한 해결책이 있습니까?
는 HTTP 당신의 GridView입니다 : //www.red-gate.com/products/dotnet-development/ants-memory-profiler/learning-memory-management/WPF-silverlight-pitfalls)) 당신은 gridview를 채우는 바인딩 경로에 바인딩하고 싶습니다. 당신의 카운트를 얻기 위해서. 더 많은 코드를 공유 할 수 있습니다. –
Thx. 예, SearchResultsPresenter는 ItemsSource = "{Binding SearchResults}"속성을 사용하는 My GridView (실제로 RadGridView ... Telerik에서 제공)입니다. 내 ToolTip에 Items.Count 대신이 바인딩을 사용할 수 있지만 어떻게 SelectedItems.Count를 표시 할 수 있습니까? – Gab