웹 브라우저가 포함 된 scrollviewer가 있습니다. scrollview 내부에도 <Button Grid.Row="1"> <Button.Background> <ImageBrush ImageSource="../Images/cont_banner.png" /> </Button.Background> <Button.Content> <HyperlinkButton Content="" NavigateUri="callto:3950" /> </Button.Content> </Button>
버튼을 추가해야하지만 그럴 수는 없습니다.스크롤 뷰어에 버튼과 웹 브라우저 추가하기
scroolviewer 외부 버튼이있는이 코드는 어떻게 내부로 옮길 수 있습니까?
<DataTemplate>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
<RowDefinition Height="100"/>
</Grid.RowDefinitions>
<ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto" Margin="25, 0, 0, 0" Grid.Row="0">
<!--<TextBlock Text="{Binding Path=Descrption}" Style="{StaticResource servicesText}" TextWrapping="Wrap" />-->
<phone:WebBrowser DataContext="{Binding Path=Descrption}" x:Name="webBrowserHTML" Foreground="Black" Loaded="webBrowserHTML_Loaded" />
</ScrollViewer>
<!--<Image Source="../Images/cont_banner.png" Width="270" Grid.Row="1"/>-->
<Button Grid.Row="1">
<Button.Background>
<ImageBrush ImageSource="../Images/cont_banner.png" />
</Button.Background>
<Button.Content>
<HyperlinkButton Content="" NavigateUri="callto:3950" />
</Button.Content>
</Button>
</Grid>
</DataTemplate>
</controls:Pivot.ItemTemplate>
stackPanel을 추가하는 경우 웹 브라우저 DataContext = "{Binding Path = Descrption}"의 바인딩이 작동하지 않습니다. ?? – user1428798
@ user1428798 업데이트 된 답변 :로드 된 이벤트가 발생하면서 바인딩이 작동합니다. 단지 기본값이 0입니다. 컨트롤을 볼 수 있으려면 컨트롤의 높이를 설정해야합니다. –