이미지와보기 상자 사이의 양식 상단에 가로 버튼 행을 추가하려고하는데 버튼을 추가하면 이미지가 채워집니다. 버튼을 포함하는 그리드를 추가하려고했지만 이미지 요소가 채워졌습니다. 누구든지 내가 이것을 어떻게 얻을 수 있는지 알고 있습니까?
이 문제에 대한 빠른 수정이 있어야한다고 확신합니다. 왜 이런 일이 발생했는지 설명해 주시겠습니까? 저는 보통 디자이너를 사용하지만이 경우 xaml 요소와 속성에 대해 더 잘 이해해야한다고 생각합니다.
다음은 창 레이아웃을 정의하는 방법입니다.
<Window x:Class="KinectKickboxingBVversion1.ConditioningFrm"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="ConditioningFrm" Height="377.612" Width="637.313">
<Grid>
<Viewbox Grid.Row="1" Stretch="Uniform" HorizontalAlignment="Center">
<Image Name="Image" Width="640" Height="250"/>
</Viewbox>
</Grid>
</Window>
이미지 소스를 비트 맵으로 설정 :
KinectVideo.Source = BitmapSource.Create(colorFrame.Width, colorFrame.Height, 96, 96,
PixelFormats.Bgr32, null, colorData, colorFrame.Width * colorFrame.BytesPerPixel)
크기 조정없이 양식 상단에 배치하려면 다음을 수행하십시오.
<Window x:Class="KinectKickboxingBVversion1.ConditioningFrm"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="ConditioningFrm" Height="377.612" Width="637.313">
<Grid>
<Grid.RowDefinitions>
<RowDefintion Height="Auto" />
<RowDefintion Height="*" />
</Grid.RowDefinitions>
<StackPanel Orientation="Horizontal" Grid.Row="0">
<Button Content="1"/>
<Button Content="2"/>
<Button Content="2"/>
</StackPanel>
<Viewbox Grid.Row="1" Stretch="Uniform" HorizontalAlignment="Center">
<Image Name="Image" Width="640" Height="250"/>
</Viewbox>
</Grid>
</Window>
Viewbox에 버튼의 StackPanel을 추가하려면 다음과 같이하십시오.
<Window x:Class="KinectKickboxingBVversion1.ConditioningFrm"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="ConditioningFrm" Height="377.612" Width="637.313">
<Viewbox Stretch="Uniform" HorizontalAlignment="Center">
<StackPanel Orientation="Vertical">
<StackPanel Orientation="Horizontal">
<Button Content="1"/>
<Button Content="2"/>
<Button Content="2"/>
</StackPanel>
<Image Name="Image" Width="640" Height="250"/>
</StackPanel>
</Viewbox>
</Window>
이미지 소스를 비트 맵으로 설정 :
KinectVideo.Source = BitmapSource.Create(colorFrame.Width, colorFrame.Height, 96, 96,
PixelFormats.Bgr32, null, colorData, colorFrame.Width * colorFrame.BytesPerPixel)
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다