We have two instances of a rad-schedule view, both are displayed as timeline view. When the user drags an appointment from one scheduler and tries to drop the appointment into the other, the start date of the appointment is the same as in the drag-scheduler. Is it possible to set the start-date to the actual mouse-position?
I've tried to do this in our custom drag&drop behaviour, but it is not working.
EDIT
The problem in my cause occurred, because the first scheduler shows appoint that has a minimum duration of one day, the other one has a slot size of 15min. If I now start the drag&drop process by picking the appointment on the right side, it is very hard to point to the expected date and time. What I need is, that the dragged appointment always starts at the mouse cursor.
The black arrow is my mouse cursor, and I want to start the appointment at that position.
Thanks a lot!
I have a RadDocking element in my xaml. I need to add one main button that opens and closes the main menu above the RadDocking element.
The problem is, the RadPane-s that open inside the RadDocking element would go below the button and the title of a given RadPane is hidden.
I want my main button to be above the RadDocking element, but the header/title of all the panes should be at all time visible and not hidden by the button.
I was wondering, can there be some constrained area inside RadDocking tag where RadPanes would not go or cover, so I can place my button above the RadDocking in that area?
Seems a bit non-sense but there has to be a way.
Should I use conditional docking? But how would that work, mark each new pane with a tag and then choose HeaderTemplate with HeaderTemplateSelector whether to add or not, space to the left in the RadPane header?
EDIT:
I maybe need some polygon-like container element that supports direct content. I need to be able to dock on right and below the button but panes should not go below the button and hide their title.
Check attached image.
Here is my modified ControlTemplate:
<ControlTemplate x:Key="RadDockingControlTemplate" TargetType="tk:RadDocking">
<Grid x:Name="Root">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<Button Width="80" Height="36" Content="Text" Grid.Column="0" Grid.Row="0"/>
<Border
Grid.Row="0"
Grid.Column="1"
Grid.RowSpan="2"
x:Name="Border"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
Padding="{TemplateBinding Padding}">
<tk:RadDockPanel x:Name="RootDockPanel">
<dock:AutoHideArea x:Name="LeftAutoHide" tk:RadDockPanel.Dock="Left"
TabStripPlacement="Left" BackgroundVisibility="Collapsed"
TabOrientation="Vertical"/>
<dock:AutoHideArea x:Name="RightAutoHide"
tk:RadDockPanel.Dock="Right" TabStripPlacement="Right"
BackgroundVisibility="Collapsed" TabOrientation="Vertical"/>
<dock:AutoHideArea x:Name="TopAutoHide" tk:RadDockPanel.Dock="Top"
TabStripPlacement="Top" BackgroundVisibility="Collapsed"
TabOrientation="Horizontal"/>
<dock:AutoHideArea x:Name="BottomAutoHide"
tk:RadDockPanel.Dock="Bottom" TabStripPlacement="Bottom"
BackgroundVisibility="Collapsed" TabOrientation="Horizontal"/>
<tk:DockingPanel x:Name="ContentDockPanel" Margin="0">
<dock:DocumentHost x:Name="DocumentHost" IsTabStop="{TemplateBinding IsTabStop}"/>
</tk:DockingPanel>
</tk:RadDockPanel>
</Border>
</Grid>
</ControlTemplate>
Hi,
I've noticed the gallery items are scrollable when many items are placed. I was wondering how to make the gallery sections/categories scrollable as well. Sometimes in our application we have so many categories they don't fit.
Kind regards
I've used telerik rad diagram for creating a kind of blue-print system (flow system). In this flow-system we have a lot of nodes and connections. Is it possible to show connections like this?
At the moment it looks like this:
I've tried to work with the bezier-connection-type, but that didn't work as expected:
EDIT
Style while drag&drop:
After the drop it looks like this:
Thanks a lot!
Hi,
I have a scatter point series with chart track ball enabled and SnapMode set to ClosestPoint, but with multiple series added to the chart I see a point per series.
Each colour in above image is a separate series added from code. The chart itself is in XAML.
<telerik:RadCartesianChart Grid.Row="0" BorderBrush="Transparent" Background="White" x:Name="radChartView" HorizontalAlignment="Stretch" VerticalContentAlignment="Stretch" DockPanel.Dock="Top">
<telerik:RadCartesianChart.Behaviors>
<telerik:ChartTrackBallBehavior ShowIntersectionPoints="True" ShowTrackInfo="False" SnapMode="ClosestPoint" />
</telerik:RadCartesianChart.Behaviors>
<telerik:RadCartesianChart.TrackBallLineStyle>
<Style TargetType="Polyline">
<Setter Property="Visibility" Value="Collapsed" />
</Style>
</telerik:RadCartesianChart.TrackBallLineStyle>
</telerik:RadCartesianChart>
I've only seen examples of SnapMode=ClosestPoint on LineSeries plots. Should this work on ScatterPointSeries?
Thanks,
Neil
Hello,
If we follow the WPF good practices, the `OnLostFocus` method must be called when the control loses focus and it's the job of this method to raise the `LostFocus` event.
In the case of the AutoCompleteBox, the event is raised, but the method is not called. So it's not possible to do some work before the event is raised.
Hello,
I am using the ContentTemplateSelector-Property of the RadPathButton, but nothing happens. Is there some trick to activate this feature?
My xaml:
<utils:MessageDirectionTemplateSelector x:Key="messageDirectionTemplateSelector">
<utils:MessageDirectionTemplateSelector.DecEditDataTemplate>
<DataTemplate>
<ContentControl ContentTemplate="{StaticResource icon:outMessage}"/>
</DataTemplate>
</utils:MessageDirectionTemplateSelector.DecEditDataTemplate>
<utils:MessageDirectionTemplateSelector.HexEditDataTemplate>
<DataTemplate>
<ContentControl ContentTemplate="{StaticResource icon:inMessage}"/>
</DataTemplate>
</utils:MessageDirectionTemplateSelector.HexEditDataTemplate>
</utils:MessageDirectionTemplateSelector>
<telerik:RadPathButton Content="{Binding DataContext, RelativeSource={RelativeSource Self}}"
ContentPlacement="Right"
ContentTemplateSelector="{StaticResource messageDirectionTemplateSelector}"/>
The Selector-Class:
public class MessageDirectionTemplateSelector : DataTemplateSelector { public override DataTemplate SelectTemplate(object item, DependencyObject container) { if (item is MessageItem) { return Properties.Settings.Default.CanIdHex ? HexEditDataTemplate : DecEditDataTemplate; } if (item is MessageSignalItem) { return Properties.Settings.Default.MuxValueHex ? HexEditDataTemplate : DecEditDataTemplate; } if (item is EnumValueItem) { return Properties.Settings.Default.EnumValueHex ? HexEditDataTemplate : DecEditDataTemplate; }
return null; }
public DataTemplate HexEditDataTemplate { get; set; } public DataTemplate DecEditDataTemplate { get; set; } }
regards,
Tobias
Hi,
Getting this exception sometimes and not able to reproduce it. Could you give scenario where this exception is possible? So that we can try to reproduce and fix. Attached screen has busy indicator in each tile . We couldn't get any clue from stack trace.
Thanks in advance.
Hello,
I have a Word document in docx format and mail merge with Excel in xls format.
The following are mergefields that rendered properly in Word but not when I do mail merge in my code.
{ MERGEFIELD TODAY \@ “MM/dd/yy” }
{ MERGEFIELD BAL \# ####,0.00 }
The following code:
using (Stream stream = new FileStream(docxPath +docxFilename, FileMode.Open)) { stream.Seek(0, SeekOrigin.Begin); byte[] bytes = new byte[stream.Length]; stream.Read(bytes, 0, bytes.Length); templateDocument = new DocxFormatProvider().Import(bytes); IEnumerable mailMergeSource = this.GetMailMergeDataSource(worksheet); mergeDocument = templateDocument.MailMerge(mailMergeSource); this.SaveFile(mergeDocument); }
Above is the main code that do mailmerge
The GetMailMergeDataSource is give below:
private IEnumerable GetMailMergeDataSource(Worksheet worksheet)
{
List<DynamicDataObject> mailMergeSource = new List<DynamicDataObject>();
string[] fieldNames = new string[worksheet.UsedCellRange.ColumnCount];
int columnCount;
int rowCount;
CellSelection selection;
for (columnCount = 0; columnCount < worksheet.UsedCellRange.ColumnCount; columnCount++)
{
selection = worksheet.Cells[0, columnCount];
fieldNames[columnCount] = selection.GetValue().Value.RawValue.ToString();
}
for (rowCount = 1; rowCount < worksheet.UsedCellRange.RowCount; rowCount++)
{
DynamicDataObject data = new DynamicDataObject();
for (columnCount = 0; columnCount < worksheet.UsedCellRange.ColumnCount; columnCount++)
{
selection = worksheet.Cells[rowCount, columnCount];
data.Set(fieldNames[columnCount], selection.GetValue().Value.RawValue);
}
if (columnCount > 0)
mailMergeSource.Add(data);
}
return mailMergeSource;
}
DynamicDataaObject is derived from Telerik own's sample document-processing-sdk-master > WordsProcessing
the SaveFile is below:
private void SaveFile(RadFlowDocument document) { using (Stream stream = File.OpenWrite(newDocxPath + newDocxFilename)) { DocxFormatProvider formatProvider = new DocxFormatProvider(); DocxExportSettings exportSettings = new DocxExportSettings { AutoUpdateFields = true, InvalidDocumentAction = InvalidDocumentAction.ThrowException }; formatProvider.ExportSettings = exportSettings; formatProvider.Export(document, stream); } }
It works. It merged into another docx document but the Merge Field format failed. But to do the same with Word merge, the resulting file shows proper format.
Let me know if you need full working sample that demo the problem.
Thank,