I've got a slider bound to a double property. The double property controls the opacity of a shape right next to my control
When I drag the center thumb with the mouse, everything works perfectly. The opacity changes in 0.01 increments, the tooltip updates and the opacity changes. It does all of this smoothly.
When I try to drag that same thumb via touch, it just doesn't work. It basically seems to go from 0 to 1. Even if I set both small and large change to 0.01 and disable SnapToTicks (it has no effect). It won't drag smoothly. I've even tried styling the thumb to make it use a very large size (just to be sure it's not me missing it with touch). Still doesn't work.
What property do I have to set to make the slider change smoothly with touch as it does with the mouse?
I've attached an image of me dragging the center slider with the mouse where it's working perfectly.
Here is my XAML
<
tk:RadSlider
Grid.Row
=
"8"
Grid.Column
=
"2"
Grid.ColumnSpan
=
"3"
AutoToolTipPlacement
=
"BottomRight"
Minimum
=
"0.0"
Maximum
=
"1.0"
IsDeferredDraggingEnabled
=
"False"
Orientation
=
"Horizontal"
HorizontalAlignment
=
"Center"
SmallChange
=
"0.01"
Width
=
"300"
Margin
=
"2 2 2 5"
HandlesVisibility
=
"Visible"
Value
=
"{Binding Source={x:Static core:Settings.Default}, Path=ShapeHandleOpacity, Mode=TwoWay}"
/>
Hello
I use the RadScheduleView (Version 19.2.510) and have two questions regarding the appointment-editing window.
1) Can the window for the definition of the rule of an appointment repetition be called independently of the ScheduleView (for example, if you want to call the menu item "Edit rule" in a list of appointments)?
2) Is it possible to use your own window to edit an appointment, independent of the ScheduleView and with your own ViewModel?
Thanks
Hi all,
we are using RadGridView version 2016.2.613.45 (.NET 4.5, Visual studio 2017, C#) and are having issues with this functionality:
https://docs.telerik.com/devtools/wpf/controls/radgridview/filtering/how-to/howto-customize-the-default-field-filter-editor#filter-as-user-types
Basically, we have implemented a functionality to perform the filtering on every change(key press) in the filter bar.
However, we found a small issue(not to say a bug :) ).
When the filter mode is set to "RowFilter", and user is performing a filtering on numeric column, he is not able to type in the dot character(.).
The only way to get the dot in the filter is to type in the number and afterwards put the dot where you need it.
Example: trying to search for the number 556.32 you would need to type in the 55632 and afterwards place the dot where it needs to be.
This is only manifested when the filtering is set to trigger every time a user types. If we disable the functionality(remove the implementation), it works fine.
The implementation:
XAML:
<
telerik:RadGridView
ItemsSource
=
"{Binding}"
x:Name
=
"radGridView"
AutoGenerateColumns
=
"False"
>
<
telerik:RadGridView.Resources
>
<
custom:ConditionalConvertor
x:Key
=
"converter"
></
custom:ConditionalConvertor
>
</
telerik:RadGridView.Resources
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding SampleText}"
Header
=
"Sample Text"
>
</
telerik:GridViewDataColumn
>
<
telerik:GridViewDataColumn
DataFormatString
=
"{}{0:c0}"
DataMemberBinding
=
"{Binding SampleNumber,Converter={StaticResource converter}}"
Header
=
"Sample Number"
></
telerik:GridViewDataColumn
>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
In the code behind, we simply attach to the appropriate event:
this.radGridView.FieldFilterEditorCreated += WPFDataGrid_FieldFilterEditorCreated;
and in the "WPFDataGrid_FieldFilterEditorCreated" method we do:
private
void
WPFDataGrid_FieldFilterEditorCreated(
object
sender, EditorCreatedEventArgs e)
{
var FilterEditor = e.Editor
as
Telerik.Windows.Controls.Filtering.Editors.StringFilterEditor;
if
(FilterEditor !=
null
)
{
FilterEditor.MatchCaseVisibility = Visibility.Collapsed;
FilterEditor.BorderBrush =
new
SolidColorBrush(Colors.Transparent);
FilterEditor.Loaded += (s1, e1) =>
{
var textbox = e.Editor.ChildrenOfType<TextBox>().Single();
textbox.TextChanged += (s2, e2) =>
{
textbox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
};
};
}
else
{
if
(e.Editor
is
TextBox)
{
var textbox = e.Editor
as
TextBox;
textbox.TextChanged += (s2, e2) =>
{
textbox.GetBindingExpression(TextBox.TextProperty).UpdateSource();
};
}
}
}
Any help would be appreciated.
Regards,
Igor
I get the following exception when i run the demo as soon as the loading screen end
i run windows 7 x64
any idea how can i run the demo ?
Starting WPF QSF at 24/05/2019 00:40:08.505
Exception at 24/05/2019 00:40:09.182.
Example: (null).
----------------
Input file or data stream does not conform to the expected file format specification.
at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlObjectWriter objectWriter)
at System.Windows.FrameworkTemplate.LoadOptimizedTemplateContent(DependencyObject container, IComponentConnector componentConnector, IStyleConnector styleConnector, List`1 affectedChildren, UncommonField`1 templatedNonFeChildrenField)
at System.Windows.FrameworkTemplate.LoadContent(DependencyObject container, List`1 affectedChildren)
at System.Windows.StyleHelper.ApplyTemplateContent(UncommonField`1 dataField, DependencyObject container, FrameworkElementFactory templateRoot, Int32 lastChildIndex, HybridDictionary childIndexFromChildID, FrameworkTemplate frameworkTemplate)
at System.Windows.FrameworkTemplate.ApplyTemplateContent(UncommonField`1 templateDataField, FrameworkElement container)
at System.Windows.FrameworkElement.ApplyTemplate()
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
at System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Controls.Border.MeasureOverride(Size constraint)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Window.MeasureOverrideHelper(Size constraint)
at System.Windows.Window.MeasureOverride(Size availableSize)
at Telerik.Windows.Controls.InternalWindow.ChromelessWindowHelper.WindowHostWindow.MeasureOverride(Size availableSize)
at System.Windows.FrameworkElement.MeasureCore(Size availableSize)
at System.Windows.UIElement.Measure(Size availableSize)
at System.Windows.Interop.HwndSource.SetLayoutSize()
at System.Windows.Interop.HwndSource.set_RootVisualInternal(Visual value)
at System.Windows.Interop.HwndSource.set_RootVisual(Visual value)
at System.Windows.Window.SetRootVisual()
at System.Windows.Window.SetRootVisualAndUpdateSTC()
at System.Windows.Window.SetupInitialState(Double requestedTop, Double requestedLeft, Double requestedWidth, Double requestedHeight)
at System.Windows.Window.CreateSourceWindow(Boolean duringShow)
at System.Windows.Window.CreateSourceWindowDuringShow()
at System.Windows.Window.SafeCreateWindowDuringShow()
at System.Windows.Window.ShowHelper(Object booleanBox)
at System.Windows.Window.Show()
at Telerik.Windows.Controls.InternalWindow.WindowWithNoChromeWindowHost.Open(Boolean isModal)
at Telerik.Windows.Controls.WindowBase.ShowWindow(Boolean isModal)
at Telerik.Windows.QuickStart.App.OnStartup(StartupEventArgs e)
at System.Windows.Application.<.ctor>b__1_0(Object unused)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
----------------
Input file or data stream does not conform to the expected file format specification.
at MS.Internal.Text.TextInterface.Native.Util.ConvertHresultToException(Int32 hr)
at MS.Internal.Text.TextInterface.Font.CreateFontFace()
at MS.Internal.Text.TextInterface.Font.AddFontFaceToCache()
at MS.Internal.Text.TextInterface.Font.GetFontFace()
at System.Windows.Media.GlyphTypeface..ctor(Font font)
at MS.Internal.FontFace.PhysicalFontFamily.GetGlyphTypeface(FontStyle style, FontWeight weight, FontStretch stretch)
at MS.Internal.FontFace.PhysicalFontFamily.MS.Internal.FontFace.IFontFamily.GetTypefaceMetrics(FontStyle style, FontWeight weight, FontStretch stretch)
at System.Windows.Media.Typeface.ConstructCachedTypeface()
at System.Windows.Media.Typeface.get_CachedTypeface()
at System.Windows.Media.Typeface.CheckFastPathNominalGlyphs(CharacterBufferRange charBufferRange, Double emSize, Single pixelsPerDip, Double scalingFactor, Double widthMax, Boolean keepAWord, Boolean numberSubstitution, CultureInfo cultureInfo, TextFormattingMode textFormattingMode, Boolean isSideways, Boolean breakOnTabs, Int32& stringLengthFit)
at MS.Internal.TextFormatting.SimpleRun.CreateSimpleTextRun(CharacterBufferRange charBufferRange, TextRun textRun, TextFormatterImp formatter, Int32 widthLeft, Boolean emergencyWrap, Boolean breakOnTabs, Double pixelsPerDip)
at MS.Internal.TextFormatting.SimpleRun.Create(FormatSettings settings, CharacterBufferRange charString, TextRun textRun, Int32 cp, Int32 cpFirst, Int32 runLength, Int32 widthLeft, Int32 idealRunOffsetUnRounded, Double pixelsPerDip)
at MS.Internal.TextFormatting.SimpleTextLine.Create(FormatSettings settings, Int32 cpFirst, Int32 paragraphWidth, Double pixelsPerDip)
at MS.Internal.TextFormatting.TextFormatterImp.FormatLineInternal(TextSource textSource, Int32 firstCharIndex, Int32 lineLength, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak, TextRunCache textRunCache)
at MS.Internal.TextFormatting.TextFormatterImp.FormatLine(TextSource textSource, Int32 firstCharIndex, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak)
at System.Windows.Media.FormattedText.LineEnumerator.FormatLine(TextSource textSource, Int32 textSourcePosition, Double maxLineLength, TextParagraphProperties paraProps, TextLineBreak lineBreak)
at System.Windows.Media.FormattedText.LineEnumerator.MoveNext()
at System.Windows.Media.FormattedText.DrawAndCalculateMetrics(DrawingContext dc, Point drawingOffset, Boolean getBlackBoxMetrics)
at System.Windows.Media.FormattedText.get_Metrics()
at Telerik.Windows.Controls.RadGlyph.CalculateElementDesiredSize()
at Telerik.Windows.Controls.RadGlyph.RemeasureElement(DependencyObject d, DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.FrameworkElement.OnPropertyChanged(DependencyPropertyChangedEventArgs e)
at System.Windows.DependencyObject.NotifyPropertyChange(DependencyPropertyChangedEventArgs args)
at System.Windows.DependencyObject.UpdateEffectiveValue(EntryIndex entryIndex, DependencyProperty dp, PropertyMetadata metadata, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, Boolean coerceWithDeferredReference, Boolean coerceWithCurrentValue, OperationType operationType)
at System.Windows.FrameworkTemplate.ReceivePropertySet(Object targetObject, XamlMember member, Object value, DependencyObject templatedParent)
at System.Windows.FrameworkTemplate.<>c__DisplayClass45_0.<LoadOptimizedTemplateContent>b__3(Object sender, XamlSetValueEventArgs setArgs)
at System.Xaml.XamlObjectWriter.OnSetValue(Object eventSender, XamlMember member, Object value)
at System.Xaml.XamlObjectWriter.Logic_ApplyPropertyValue(ObjectWriterContext ctx, XamlMember prop, Object value, Boolean onParent)
at System.Xaml.XamlObjectWriter.Logic_DoAssignmentToParentProperty(ObjectWriterContext ctx)
at System.Xaml.XamlObjectWriter.Logic_AssignProvidedValue(ObjectWriterContext ctx)
at System.Xaml.XamlObjectWriter.WriteEndMember()
at System.Xaml.XamlWriter.WriteNode(XamlReader reader)
at System.Windows.FrameworkTemplate.LoadTemplateXaml(XamlReader templateReader, XamlObjectWriter currentWriter)
End of exception.
Hello.
Can I access SearchPanel DataContext from another part of Template?
I have a HightLightningTextBlock Class that I want to use instead of the HighLightTextBlock used in DataColumn. I use a DataTemplate:
<
DataTemplate
x:Key
=
"HighlightingTemplate"
>
<
highLight:HighlightingTextBlock
HighlightText
=
"{Binding SearchViewModel.SearchText}"
Text
=
"{Binding Name}"
>
<
i:Interaction.Behaviors
>
<
highLigthBehavior:CellValueBindingBehavior
/>
</
i:Interaction.Behaviors
>
</
highLight:HighlightingTextBlock
>
</
DataTemplate
>
I asign the DataTemplate when adding a column:
column.CellTemplate = (DataTemplate)Application.Current.Resources["HighlightingTemplate"];
I want to bind the "HighlightText" property to the "SearchText" of "PART_SearchAsYouTypeTextBox". The "Text" property works well. I use the HighlightingTextBlock because I want to change the background instead of the foreground when type in search box.
Thank you.
I switched my solution from using references to the binaries i have localy to nuget packages.
But by doing this i get a strange behaviour in the controls UI. Suddenly all controls get different theming than they had before the nuget packages.
How do i fix this so they are again showing as it was before?
A password protected Excel document causes an error message "End of central Directory not found".
Would it be possible to get a more appropriate error message at least? The possibility to enter a Password would be great, of course.
Thanks
Michael
Hi Guys
I really desperately need your help on this. I have created listbox with a toggle from materialdesign theme package and along with richtextbox. The listbox comprises of three listboxitems which are bold, italic and underline. So when the user clicks on the button and the highlighted text in the richtextbox will reflect its changes accordingly, i.e. normal font text changes to font bold.
However what I have noticed the listboxitem with button like format has to be double clicked in order to get the font text to change from bold to normal, vice versa from normal to bold. I have been struggling on how to get the single click selection and the button to show the selected highlight colour etc.
I couldn't use the event setter as it messes the highlight colour and styling of the listboxitems
PLEASE HELP - the code behind is C#
<Window x:Class="WPFDEMO.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:materialDesign="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf"
mc:Ignorable="d"
TextElement.Foreground="{DynamicResource MaterialDesignBody}"
TextElement.FontWeight="Regular"
TextElement.FontSize="13"
TextOptions.TextFormattingMode="Ideal"
TextOptions.TextRenderingMode="Auto"
Background="{DynamicResource MaterialDesignPaper}"
FontFamily="{DynamicResource MaterialDesignFont}"
xmlns:local="clr-namespace:WPFDEMO"
Title="MainWindow" Height="1080" Width="1920">
<!--<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Button.xaml" />
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Window.Resources>-->
<Grid>
<DockPanel>
<StackPanel DockPanel.Dock="Top">
<ListBox SelectionMode="Extended"
Style="{StaticResource MaterialDesignToolToggleFlatListBox}"
Background="Transparent" materialDesign:ListBoxAssist.IsToggle="True">
<!--<ListBox.ItemContainerStyle>
<Style TargetType="ListBoxItem">
<EventSetter Event="PreviewMouseDown" Handler="ItemOnPreviewMouseDown"></EventSetter>
<EventSetter Event="PreviewMouseDoubleClick" Handler="ItemOnPreviewMouseDown"></EventSetter>
</Style>
</ListBox.ItemContainerStyle>-->
<ListBoxItem x:Name="btnBold" Selected="btnBold_Selection" PreviewMouseDown="btnBold_PreviewMouseDown">
<materialDesign:PackIcon Kind="FormatBold" />
</ListBoxItem>
<ListBoxItem x:Name="btnItalic" Selected="btnItalic_Selected">
<materialDesign:PackIcon Kind="FormatItalic" />
</ListBoxItem>
<ListBoxItem x:Name="btnUnderline" Selected="btnUnderline_Selected">
<materialDesign:PackIcon Kind="FormatUnderline" />
</ListBoxItem>
</ListBox>
</StackPanel>
<RichTextBox x:Name="rtbTextbox" SelectionChanged="rtbTextbox_SelectionChanged"></RichTextBox>
</DockPanel>
</Grid>
</Window>