…
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBlock Name="HeadingText2" FontSize="30" Text="GANTT VIEWER"
Foreground="Black"
HorizontalAlignment="Center"
Grid.Row="0"/>
<TextBox x:Name="G_Heading"
Height="28" Width="980"
BorderThickness="2" Text=" "
RenderTransformOrigin="0.375,3.867"
Grid.Row="1">
<TextBox.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="10"/>
</Style>
</TextBox.Resources>
<TextBox.Effect>
<DropShadowEffect Color="#FFDEDADA" ShadowDepth="3"/>
</TextBox.Effect>
</TextBox>
<Button Name="button_filter" Content="FILTER"
TextBlock.TextAlignment="Center"
Width="180" Height="24" Click="OnClickFilterBtn"
Grid.Row="2"
Background="#FFF9FBFB" FontWeight="Bold">
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="10"/>
</Style>
</Button.Resources>
<Button.Effect>
<DropShadowEffect Color="#FFDEDADA" ShadowDepth="3"/>
</Button.Effect>
</Button>
<Button Name="button_weekly" Width="180" Height="24" Click="OnImageButtonClick"
Grid.Row="3"
Background="#FFF9FBFB">
<Image Source="/assest/5.png" Width="51" Height="24"></Image>
<Button.Resources>
<Style TargetType="{x:Type Border}">
<Setter Property="CornerRadius" Value="10"/>
</Style>
</Button.Resources>
<Button.Effect>
<DropShadowEffect Color="#FFDEDADA" ShadowDepth="3"/>
</Button.Effect>
</Button>
<gantt:GanttControl x:Name="Gantt"
ItemsSource="{Binding TaskDetails}"
VisualStyle="Metro"
ScheduleRangePadding="3"
GridWidth="100"
ScheduleType="CustomDateTime"
CustomScheduleSource="{Binding CustomScheduleSource}"
Grid.Row="4">
… |
<Grid>
<Image Source="/assest/logo.png" Height="40" HorizontalAlignment="Left" VerticalAlignment="Top"/>
<TabControl Name="TabControl1" TabStripPlacement="Left" Margin="-6,46,-14,-453" BorderBrush="White">
… |
void AssociatedObject_Loaded(object sender, RoutedEventArgs e)
{
if (this.AssociatedObject.GanttGrid != null)
{
…
ScrollViewer gridScrollViewer = this.AssociatedObject.GanttGrid.FindElementOfType<ScrollViewer>();
if (gridScrollViewer != null)
{
gridScrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Disabled;
}
…
}
} |
<gantt:GanttControl x:Name="Gantt"
ItemsSource="{Binding TaskDetails}"
VisualStyle="Metro"
ScheduleRangePadding="3"
GridWidth="150"
ScheduleType="CustomDateTime"
CustomScheduleSource="{Binding CustomScheduleSource}"
Grid.Row="2"> |
<Grid.Resources>
<!--To change the appearence of Gantt Node-->
<Style x:Key="TaskNode" TargetType="{x:Type chart:GanttNode}">
<Setter Property="Template">
…
<Thumb x:Name="PART_DragDropThumb"
Grid.Column="0"
Grid.ColumnSpan="3"
Cursor="SizeAll"
IsEnabled="False">
<Thumb.Template>
<ControlTemplate>
<Border Background="Transparent" />
</ControlTemplate>
</Thumb.Template>
</Thumb>
…
<Thumb x:Name="PART_ProgressThumb"
HorizontalAlignment="Right"
Cursor="SizeWE"
IsEnabled="False">
<Thumb.Template>
<ControlTemplate>
<Border Background="Transparent" BorderBrush="Transparent">
<Rectangle Width="5"
Height="2"
Fill="Transparent" />
</Border>
</ControlTemplate>
</Thumb.Template>
</Thumb>
</Grid>
</Border>
<Thumb x:Name="PART_RightThumb"
Grid.Column="2"
HorizontalAlignment="Right"
Cursor="ScrollE"
IsEnabled="False">
<Thumb.Template>
<ControlTemplate>
<Border Width="4"
Height="20"
Background="Transparent"
BorderBrush="Transparent"
BorderThickness="0" />
</ControlTemplate>
</Thumb.Template>
</Thumb>
<Thumb x:Name="PART_LeftThumb"
Grid.Column="0"
HorizontalAlignment="Left"
Cursor="ScrollW"
IsEnabled="False">
<Thumb.Template>
<ControlTemplate>
<Border Width="4"
Height="20"
Background="Transparent"
BorderBrush="Transparent"
BorderThickness="0" />
</ControlTemplate>
</Thumb.Template>
</Thumb>
…
</Setter>
</Style> |
void AssociatedObject_Loaded(object sender, RoutedEventArgs e)
{
if (this.AssociatedObject.GanttGrid != null)
{
…
GridSplitter gridSplitter = this.AssociatedObject.FindElementOfType<GridSplitter>();
if(gridSplitter != null)
{
gridSplitter.IsEnabled = false;
}
…
}
} |
<Window.Resources>
<SolidColorBrush x:Key="TabItem.Selected.Background" Color="#FFFFFF"/>
<SolidColorBrush x:Key="TabItem.Selected.Border" Color="#ACACAC"/>
<Style x:Key="TabControlStyle1" TargetType="{x:Type TabControl}">
<Setter Property="Padding" Value="2"/>
<Setter Property="HorizontalContentAlignment" Value="Center"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Background" Value="{StaticResource TabItem.Selected.Background}"/>
<Setter Property="BorderBrush" Value="{StaticResource TabItem.Selected.Border}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type TabControl}">
…
<Trigger Property="TabStripPlacement" Value="Left">
…
<Setter Property="Margin" TargetName="headerPanel" Value="0,46,0,0"/>
</Trigger>
…
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
…
<Grid>
<Image Source="/assest/logo.png" Height="40" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="-10,0,0,0" />
<TabControl Name="TabControl1" TabStripPlacement="Left" Margin="0,0,-14,-453" BorderBrush="White"
Style="{StaticResource TabControlStyle1}">
… |