Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

8 meses atrás
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183
  1. <Window x:Class="Example.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:Example.Views"
  7. xmlns:ViewModel="clr-namespace:Example.ViewModels"
  8. mc:Ignorable="d"
  9. Title="WhalleyBot OverlayV2" Height="650" Width="900"
  10. WindowStyle="None"
  11. Background="Transparent"
  12. AllowsTransparency="true">
  13. <Window.DataContext>
  14. <ViewModel:MainViewModel/>
  15. </Window.DataContext>
  16. <Window.Resources>
  17. <DataTemplate DataType="{x:Type ViewModel:HomeViewModel}">
  18. <local:HomeView/>
  19. </DataTemplate>
  20. <DataTemplate DataType="{x:Type ViewModel:ProfileViewModel}">
  21. <local:ProfileView/>
  22. </DataTemplate>
  23. </Window.Resources>
  24. <Border CornerRadius="15"
  25. BorderThickness="5"
  26. BorderBrush="{StaticResource PrimaryColor2}">
  27. <Grid>
  28. <Grid.RowDefinitions>
  29. <!--navigation Bar-->
  30. <RowDefinition Height="50"/>
  31. <!--Navigation Menu (Left Side)-->
  32. <RowDefinition Height="*"/>
  33. <RowDefinition Height="30"/>
  34. </Grid.RowDefinitions>
  35. <Grid.ColumnDefinitions>
  36. <ColumnDefinition Width="175"/>
  37. <ColumnDefinition Width="*"/>
  38. </Grid.ColumnDefinitions>
  39. <!--Logo-->
  40. <Border CornerRadius="10,0,0,0"
  41. Grid.Column="0"
  42. Grid.Row="0" Background="{StaticResource panelColor}"
  43. BorderBrush="{StaticResource PrimaryColor2}" BorderThickness="0 0 4 0">
  44. <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" VerticalAlignment="Center">
  45. <Image Source="/img/logo_head.png" Width="35" Height="35" Margin="20 0 0 5"></Image>
  46. <TextBlock Text="Whalley" HorizontalAlignment="Left" FontSize="18" FontWeight="Bold" Foreground="{StaticResource White}" Margin="0 10 0 0"></TextBlock>
  47. <TextBlock Text="Bot" HorizontalAlignment="Left" FontSize="18" FontWeight="Bold" Foreground="{StaticResource PrimaryColor1}" Margin="0 10 0 0"></TextBlock>
  48. </StackPanel>
  49. </Border>
  50. <!--Navigation Bar (TOP)-->
  51. <Border x:Name="NavBar" CornerRadius="0,10,0,0"
  52. Grid.Column="1"
  53. Grid.Row="0" Background="{StaticResource panelColor}">
  54. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
  55. <!--Drag Area-->
  56. <StackPanel PreviewMouseLeftButtonDown="Border_PreviewMouseLeftButtonDown" Background="Transparent" Height="50" Width="{Binding ElementName=NavBar,Path=ActualWidth}"></StackPanel>
  57. <!--NavButtons-->
  58. <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
  59. <Button x:Name="btnMinimize" Style="{StaticResource NavButton}" Content="-" Click="btnMinimize_Click"></Button>
  60. <Button x:Name="btnMaximise" Style="{StaticResource NavButton}" Content="▢" Click="btnMaximise_Click"></Button>
  61. <Button x:Name="btnClose" Style="{StaticResource NavButton}" Content="X" Click="btnClose_Click_1"></Button>
  62. </StackPanel>
  63. </StackPanel>
  64. </Border>
  65. <!--Navigation Menu-->
  66. <Border
  67. Grid.Column="0"
  68. Grid.Row="1" Background="{StaticResource panelColor}"
  69. BorderBrush="{StaticResource PrimaryColor2}" BorderThickness="0 0 4 0">
  70. <StackPanel Orientation="Vertical">
  71. <RadioButton Style="{StaticResource menuButton}"
  72. Tag="{StaticResource PrimaryColor1}"
  73. Command="{Binding ShowHomeViewCommand}">
  74. <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Margin="15 0 0 0">
  75. <!--<Icons:MaterialIcon Kind="Home" Height="25" Margin="0 0 10 0"/>-->
  76. <TextBlock Text="Home" FontSize="18" FontWeight="Bold"/>
  77. </StackPanel>
  78. </RadioButton>
  79. <RadioButton Style="{StaticResource menuButton}"
  80. Tag="{StaticResource PrimaryColor1}"
  81. Command="{Binding ShowProfileViewCommand}">
  82. <StackPanel Orientation="Horizontal" Margin="15 0 0 0">
  83. <!--<miw:MaterialIcon Kind="Person" Height="25" Margin="0 0 10 0"/>-->
  84. <TextBlock Text="Profile" FontSize="18" FontWeight="Bold"/>
  85. </StackPanel>
  86. </RadioButton>
  87. <RadioButton Style="{StaticResource menuButton}"
  88. Tag="{StaticResource PrimaryColor1}">
  89. <StackPanel Orientation="Horizontal" Margin="15 0 0 0">
  90. <!--<miw:MaterialIcon Kind="Info" Height="25" Margin="0 0 10 0"/>-->
  91. <TextBlock Text="About" FontSize="18" FontWeight="Bold"/>
  92. </StackPanel>
  93. </RadioButton>
  94. <Button Content="Overlay" Click="Button_ShowWPFOverlay_Clicked"></Button>
  95. </StackPanel>
  96. </Border>
  97. <!--Main Window-->
  98. <Border
  99. Grid.Column="1"
  100. Grid.Row="1" Background="{StaticResource panelColor}">
  101. <Grid>
  102. <Grid.RowDefinitions>
  103. <!--Header / Menu Title-->
  104. <RowDefinition Height="35"/>
  105. <!--Child View WINDOW-->
  106. <RowDefinition/>
  107. </Grid.RowDefinitions>
  108. <!--Header / Menu Title-->
  109. <Grid Grid.Row="0">
  110. <Grid.ColumnDefinitions>
  111. <ColumnDefinition/>
  112. <ColumnDefinition/>
  113. </Grid.ColumnDefinitions>
  114. <!--Window Title-->
  115. <StackPanel Grid.Column="0" VerticalAlignment="Center" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10 0 20 0">
  116. <!--<miw:MaterialIcon Kind="{Binding WindowIcon}"
  117. Height="20"
  118. Width="20"
  119. Foreground="{StaticResource PrimaryColor1}" Margin="20 0 0 0 ">
  120. </miw:MaterialIcon>-->
  121. <TextBlock Text="{Binding Windowtitle}" FontWeight="Bold" Foreground="{StaticResource PrimaryColor1}" FontSize="18" Margin="10 0 0 0 "></TextBlock>
  122. </StackPanel>
  123. <!--User Profile-->
  124. <StackPanel Grid.Column="1" Orientation="Horizontal" FlowDirection="RightToLeft" VerticalAlignment="Center" Margin="0 0 10 0">
  125. <!--<miw:MaterialIcon Kind="ArrowBottomCircle" Foreground="{StaticResource PrimaryColor1}" Margin="10 10 0 10"></miw:MaterialIcon>-->
  126. <TextBlock x:Name="MainWindow_UserName" Text="{Binding playerInfoModule.playerName}" VerticalAlignment="Center" Margin="10 0 0 0" Foreground="{StaticResource PrimaryColor2}" FontWeight="Bold"></TextBlock>
  127. <Ellipse Width="25" Height="25" Margin="10 0 0 0" Stroke="{StaticResource PrimaryColor2}" StrokeThickness="1">
  128. <Ellipse.Fill>
  129. <ImageBrush ImageSource="https://cdn-icons-png.flaticon.com/512/3135/3135715.png"/>
  130. </Ellipse.Fill>
  131. </Ellipse>
  132. </StackPanel>
  133. </Grid>
  134. <!--Child View WINDOW-->
  135. <ContentControl Content="{Binding CurrentChildView}" Grid.Row="1" Margin="20"></ContentControl>
  136. </Grid>
  137. </Border>
  138. <!--Footer Bar -->
  139. <Border x:Name="Footer_Border" CornerRadius="0,0,10,0"
  140. Grid.Column="1"
  141. Grid.Row="2" Background="{StaticResource panelColor}">
  142. <StackPanel x:Name="Footer" Width="{Binding ElementName=Footer_Border, Path=ActualWidth}" Orientation="Horizontal" VerticalAlignment="Center" HorizontalAlignment="Center">
  143. <TextBox Width="350" HorizontalContentAlignment="Left" Text="©Zypher.com - WhalleyBot" FontWeight="Bold" FontSize="10" Margin="10 0 25 0" Foreground="{StaticResource PrimaryColor1}" BorderThickness="0 0 0 0"></TextBox>
  144. <TextBox x:Name="lbl_name" Width="200" HorizontalContentAlignment="Right" Text="Version: (Beta) xxxx" FontWeight="Bold" FontSize="10" Margin="25 0 10 0" Foreground="{StaticResource PrimaryColor1}" BorderThickness="0 0 0 0"/>
  145. </StackPanel>
  146. </Border>
  147. <!--Footer Bar (Left)-->
  148. <Border CornerRadius="0,0,0,10"
  149. Grid.Column="0"
  150. Grid.Row="2" Background="{StaticResource panelColor}"
  151. BorderBrush="{StaticResource PrimaryColor2}" BorderThickness="0 0 4 0">
  152. </Border>
  153. </Grid>
  154. </Border>
  155. </Window>