October 19, 2025, 11:22:42 AM

See more Support incidents in our old archived forum.

Recent Posts

Pages: 1 ... 8 9 [10]
91
WPF Gantt Package / Re: Drag Task over Working hours
« Last post by Rajagopal on June 22, 2020, 02:07:34 PM »
Francesco,

You can disable horizontal taskbar movement as shown below,

Code: [Select]
public MainPage()
{
    InitializeComponent();

    ShiftTracker.Global.MinDeltaYValue = -1;
    ShiftTracker.Global.IncludeVerticalMovingSupport = true;
}

Thanks,
Raja.
92
WPF Gantt Package / Re: Drag Task over Working hours
« Last post by Rajagopal on June 19, 2020, 03:56:07 PM »
Francesco,

We are working on this, will update you soon.

Thanks,
Raja.
93
WPF Gantt Package / Re: Drag Task over Working hours
« Last post by Francesco Fantoni on June 19, 2020, 07:14:00 AM »
Hi,
to be honest, I'd like horizontal movement to act as vertical movement with moving popup and DragOver and DragDrop event.
One possible solution, I think, would be to restrict horizontal movement and use only vertical movement for all moving actions (this is the reason for the question but I welcome every suggestion).

I hope I explained myself
Thanks
Francesco
94
WPF Gantt Package / Re: Drag Task over Working hours
« Last post by Rajagopal on June 18, 2020, 09:53:55 AM »
Francesco,

Horizontal movement of tasks should be restricted, only vertical movement should be allowed. Is this what you are looking for? Please clarify.

Thanks,
Raja.
95
WPF Gantt Package / Re: Drag Task over Working hours
« Last post by Francesco Fantoni on June 17, 2020, 04:14:14 PM »
Thanks Raja, it seems ok now! ;D

Another question: Is there someway to avoid side shifting? I'd like to move a Task only with VerticalDragDrop and not with side shifting. This because I don't want the Task can move wherever on the row or above another task. With VerticalDragDrop event I can deny drop on some locations.


Thanks very much
Francesco
96
WPF Gantt Package / Re: Drag Task over Working hours
« Last post by Rajagopal on June 17, 2020, 03:56:09 PM »
Francesco,

Please include the style for rows in the application as it was missing. We have sent the reference sample in e-mail.

Code:
Code: [Select]
<Style x:Key="BaseRowStyle" TargetType="{x:Type DataGridRow}">
    <Setter Property="SnapsToDevicePixels" Value="true"/>
    <Setter Property="Validation.ErrorTemplate" Value="{x:Null}"/>
    <Setter Property="ValidationErrorTemplate">
        <Setter.Value>
            <ControlTemplate>
                <TextBlock Foreground="Red" Margin="2,0,0,0" Text="!" VerticalAlignment="Center"/>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
    <Setter Property="BorderThickness" Value="0"/>
    <Setter Property="Template">
        <Setter.Value>
            <ControlTemplate TargetType="{x:Type DataGridRow}">
                <Grid>
                    <Border x:Name="DGR_Border" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
                        <SelectiveScrollingGrid>
                            <SelectiveScrollingGrid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto"/>
                                <ColumnDefinition Width="*"/>
                            </SelectiveScrollingGrid.ColumnDefinitions>
                            <SelectiveScrollingGrid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="Auto"/>
                            </SelectiveScrollingGrid.RowDefinitions>

                            <Rectangle x:Name="BackgroundRectangle" Fill="#FFBADDE9" Grid.ColumnSpan="2" Grid.RowSpan="2" Opacity="0"/>

                            <Rectangle x:Name="BackgroundSelRectangle" IsHitTestVisible="False" Grid.Column="1" Grid.RowSpan="2" Fill="#badde9" Opacity="0"/>

                            <DataGridCellsPresenter Grid.Column="1" ItemsPanel="{TemplateBinding ItemsPanel}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                            <DataGridDetailsPresenter Grid.Column="1" Grid.Row="1" SelectiveScrollingGrid.SelectiveScrollingOrientation="{Binding AreRowDetailsFrozen, ConverterParameter={x:Static SelectiveScrollingOrientation.Vertical}, Converter={x:Static DataGrid.RowDetailsScrollingConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}" Visibility="{TemplateBinding DetailsVisibility}"/>
                            <DataGridRowHeader Grid.RowSpan="2" SelectiveScrollingGrid.SelectiveScrollingOrientation="Vertical" Visibility="{Binding HeadersVisibility, ConverterParameter={x:Static DataGridHeadersVisibility.Row}, Converter={x:Static DataGrid.HeadersVisibilityConverter}, RelativeSource={RelativeSource AncestorType={x:Type DataGrid}}}"/>
                            <Path x:Name="CurrentRowGlyph" IsHitTestVisible="False" Data="F1 M 511.047,352.682L 511.047,342.252L 517.145,347.467L 511.047,352.682 Z " HorizontalAlignment="Center" Height="10" Margin="8,0,8,0" Opacity="0" Grid.RowSpan="2" Stretch="Fill" VerticalAlignment="Center" Width="6">
                                <Path.Fill>
                                    <LinearGradientBrush EndPoint="0,1.75" StartPoint="0,-.15">
                                        <GradientStop Color="#FF84E3FF" Offset="0"/>
                                        <GradientStop Color="#FF6ABFD8" Offset="0.5"/>
                                        <GradientStop Color="#FF5297AB" Offset="1"/>
                                    </LinearGradientBrush>
                                </Path.Fill>
                            </Path>
                        </SelectiveScrollingGrid>
                    </Border>

                </Grid>
                <ControlTemplate.Triggers>
                    <Trigger Property="IsSelected" Value="true">
                        <Setter Property="Opacity" TargetName="CurrentRowGlyph" Value="1"/>
                        <Trigger.EnterActions>
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetName="BackgroundSelRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="1" />
                                </Storyboard>
                            </BeginStoryboard>
                        </Trigger.EnterActions>
                        <Trigger.ExitActions>
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetName="BackgroundSelRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="0" />
                                </Storyboard>
                            </BeginStoryboard>
                        </Trigger.ExitActions>
                    </Trigger>
                    <Trigger Property="gantt:GanttTableBase.CombinedIsMouseOver" Value="true">
                        <Trigger.EnterActions>
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To=".5" />
                                </Storyboard>
                            </BeginStoryboard>
                        </Trigger.EnterActions>
                        <Trigger.ExitActions>
                            <BeginStoryboard>
                                <Storyboard>
                                    <DoubleAnimation Storyboard.TargetName="BackgroundRectangle" Storyboard.TargetProperty="Opacity" Duration="0" To="0" />
                                </Storyboard>
                            </BeginStoryboard>
                        </Trigger.ExitActions>
                    </Trigger>
                </ControlTemplate.Triggers>
            </ControlTemplate>
        </Setter.Value>
    </Setter>
</Style>

<Style TargetType="{x:Type DataGridRow}" BasedOn="{StaticResource BaseRowStyle}">
</Style>


Thanks,
Raja.
97
WPF Gantt Package / Re: Drag Task over Working hours
« Last post by Francesco Fantoni on June 16, 2020, 06:09:42 PM »
Hi Raja,
can you give me an update?
Thanks
Francesco
98
WPF Gantt Package / Re: Drag Task over Working hours
« Last post by Rajagopal on June 12, 2020, 11:40:23 AM »
Francesco,

We are looking on this, will update you soon.

Thanks,
Raja.
99
WPF Gantt Package / Re: Drag Task over Working hours
« Last post by Francesco Fantoni on June 12, 2020, 11:01:33 AM »
I'd like to add that I have set SyncRowBackgrounds = true

Thanks
100
WPF Gantt Package / Drag Task over Working hours
« Last post by Francesco Fantoni on June 11, 2020, 07:05:23 PM »
Hi,
I need your help again, sorry  :(
Consider this sample https://we.tl/t-qnggcEovZw (I reuse a project from the last post, sorry).

and consider the following Event handler:
 void ShiftTracker_VerticalDragOver(object sender, EventArgs e)
        {
            Point dropCueLocation = ShiftTracker.Global.GetDropCueLocationIn(this.LayoutRoot);
            this.ShowDropCueAt(dropCueLocation);

            bool canDrop = false;
            if (ShiftTracker.Global.CurrentDropRow != null)
            {
                    canDrop = true;
                System.Diagnostics.Debug.WriteLine(ShiftTracker.Global.CurrentDropRow.ToString());
            }
            else
                System.Diagnostics.Debug.WriteLine("null!");

           
            if (canDrop)
                this.ShowCanDropCue();
            else
                this.ShowNoDropCue();
        }

It seems the ShiftTracker.Global.CurrentDropRow is always null if you drag over a working hour and not null over a non-working hour

I you try to move the task in another row CurrentDropRow is not null only over nonworking hours
 


There is maybe something wrong but I don't know what
Thanks for your support
Francesco


Pages: 1 ... 8 9 [10]