Telerik Forums
UI for WPF Forum
1 answer
135 views

If I select Hue Shift and move the slider and have a value of 115.75, then I click on the "Saturation" item and make adjustments via slide to 20.12, now I click on Hue Shift and it's value has reset back to 0.0 even though the "Hue shift" has been applied to the image?

My expectation was the Hue Shift value would be retained NOT reset ... this happens to all the command controls.  Is there a way to prevent the reset of these values when I navigate from command (HueShift) to command (Saturation)?

I noticed your ImageEditor sample application has the same issue ... see video for clarity:

https://youtu.be/ya4a5lMQBdU

Cheers, Rob.

 

Martin Ivanov
Telerik team
 answered on 07 Dec 2020
2 answers
755 views

I am following the documentation from here:

But I would like to use a RadGlyph instead of an image url. Is there a way to use a RadGlyph instead of an image for the IconUrl property in the following class and template? I have not been able to get it to work.

public class MenuItem
{
    public MenuItem()
    {
        this.SubItems = new ObservableCollection<MenuItem>();
    }
 
    public string Text { get; set; }
    public Uri IconUrl { get; set; }
    public bool IsSeparator  { get; set; }
    public ICommand Command { get; set; }
    public ObservableCollection<MenuItem> SubItems { get; set; }
}

 

<Style x:Key="MenuItemStyle" TargetType="telerik:RadMenuItem">
    <Setter Property="Icon" Value="{Binding IconUrl}"/>
    <Setter Property="IconTemplate">
        <Setter.Value>
            <DataTemplate>
                <Image Source="{Binding}" Stretch="None"/>
            </DataTemplate>
        </Setter.Value>
    </Setter>
    <Setter Property="IsSeparator" Value="{Binding IsSeparator}"/>
    <Setter Property="Header" Value="{Binding Text}"/>
    <Setter Property="ItemsSource" Value="{Binding SubItems}"/>
    <Setter Property="Command" Value="{Binding Command}"/>
</Style>

 

Regards,

Don

 

Dilyan Traykov
Telerik team
 answered on 04 Dec 2020
5 answers
737 views

I use the UI for WPF (version 2020.3.1020) with a .NET Core 3.1 application on Windows 10.  I get my Telerik assemblies directly from the Telerik NuGet servers.   This has been working well for about a year.

I tried to upgrade my projects to .NET 5 and it does not compile.  Whereever I use Telerik types, I get build errors like this:

(345,17,345,53): error CA1416: 'SelectionRange<double>' is supported on 'Windows' 7.0 and later
 
(1031,23,1031,31): error CA1416: 'CartesianPlotBandAnnotation.Axis.get' is supported on 'Windows' 7.0 and later

 

I've seen on Telerik's own page that they at least support the .NET 5 Preview

Telerik UI for WPF also provides assemblies for .NET 5.0 Preview (since R2 2020) and .NET 5.0 Release Candidate 1 (RC1) (since R3 2020).

So I'm wondering how I can make my project work with the official .NET 5?  Is this supported yet?



Vladimir Stoyanov
Telerik team
 answered on 04 Dec 2020
2 answers
134 views

Hi,  How do I get the count function to show '0' when there are no rows on the Grid?  

The aggregate functions all seem to disappear when there are no rows.

Thanks,

Richard

 

<telerik:GridViewColumn.AggregateFunctions>
    <telerik:CountFunction ResultFormatString=" {0}" />
</telerik:GridViewColumn.AggregateFunctions>
Richard
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 03 Dec 2020
2 answers
147 views

When I select the Material Theme any image with a RadButton doesn't display.

<telerik:RadButton x:Name="bnApplyTreeScapeSet" Width="28" Height="28" HorizontalAlignment="Left" VerticalAlignment="Center" telerik:RadToolTipService.ToolTipContentTemplate="{x:Null}" telerik:RadToolTipService.InitialShowDelay="100" telerik:RadToolTipService.BetweenShowDelay="0">
    <Image Source="../Resources/save_32.png" Stretch="Uniform" />
    <telerik:RadToolTipService.ToolTipContent>
        <telerik:RadToolTipContentView>
            <TextBlock Text="Apply TreeScape set to Flight Simulator" />
        </telerik:RadToolTipContentView>
    </telerik:RadToolTipService.ToolTipContent>
</telerik:RadButton>

 

My save_32.png doesn't display, non of my Images in any RadButton display.  I've test ALL the other Themes and they work as expected, images display.  This issue is ONLY with Material theme ... which is a shame be cause it's a nice theme.

Thoughts?

Cheers, Rob.

 

Rob A.
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 03 Dec 2020
2 answers
515 views
Hello,

I want to bind some property from my ViewModel to a RadWindow.HeaderTemplate. My approach seems not to work. Can you help me with this?

 
<telerik:RadWindow.HeaderTemplate>
    <DataTemplate>
        <StackPanel Orientation="Horizontal">
            <Image Width="18" Source="Resources/ICO/CANsymEdit.ico" Stretch="Uniform" />
            <!--<ContentPresenter Content="{Binding}" Margin="5,0" />-->
            <TextBlock Text="{Binding DataContext.ActiveDocument, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}}" VerticalAlignment="Center" Margin="5,0" />
        </StackPanel>
    </DataTemplate>
</telerik:RadWindow.HeaderTemplate>

 

regards,

Tobias

Peter
Top achievements
Rank 2
Iron
Iron
Veteran
 answered on 03 Dec 2020
1 answer
217 views

I'm currently using the RadMaskedNumericInput as follows:

<telerik:RadMaskedNumericInput Value="{Binding Value}" Mask="#6.3" SelectionOnFocus="SelectAll" UpdateValueEvent="LostFocus" TextMode="PlainText" IsClearButtonVisible="False" AutoFillZeros="True" HorizontalAlignment="Stretch" Culture="zh-CN" Placeholder=" "  AutoFillNumberGroupSeparators="False" />

As long I'm using german or english keyboard settings, this works as exptected. So if I would type in e.g. "1.23" (either with dot or comma as the decimal seperator), I get the exact same value.

But now one of our chinese customers has informed us, that he isn't able to input the values as exptected. So for testing purposes, I switched the keyboard layout virtually to Chinese (simplified, China) - Microsoft PinYin. This is then things start to get strange: With that, if I click in the control as before and then typing "1.23", I get the odd number "100.010,200" (again same result either for dot or comma).

Does anyone know why this happens and how to avoid this behavior?

Thanks in advance.

Dinko | Tech Support Engineer
Telerik team
 answered on 03 Dec 2020
4 answers
788 views

Hello!

Is it possible to change the titelbar background color (window titlebar) to the Office 2016 theme accent color?

Martin Ivanov
Telerik team
 answered on 03 Dec 2020
4 answers
355 views

<telerik:RadGridView   ItemsSource  ="{Binding ResultList}"
                                     rad:GridViewSelectionUtilities.SelectedItems = "{Binding ResultItems}"
                                     Margin="10,5"
                                     GroupRenderMode ="Flat"
                                     HorizontalAlignment="Left"
                                     AutoGenerateColumns="False"
                                     ShowColumnHeaders="True"
                                     RowDetailsVisibilityMode="Visible"
                                     ShowGroupFooters="False"
                                     ShowGroupPanel="False"
                                     RowIndicatorVisibility="Collapsed" 
                                     EnableColumnVirtualization="True"
                                     EnableRowVirtualization="True"
                                     VirtualizingPanel.IsVirtualizing="True"
                                     ScrollViewer.HorizontalScrollBarVisibility ="Auto"
                                     ScrollViewer.VerticalScrollBarVisibility ="Visible"
                                     FrozenColumnsSplitterVisibility="Collapsed" 
                                     IsFilteringAllowed="False"
                                     IsReadOnly="True"
                                     AutoExpandGroups="False"
                                     ShowSearchPanel="True"
                                     SearchPanelCloseButtonVisibility="Collapsed"
                                     SelectionMode="Extended"
                                     SelectionUnit="FullRow"
                                     >
                   
                    <telerik:RadGridView.GroupHeaderTemplate>
                        <DataTemplate>
                            <StackPanel Orientation="Horizontal">
                                <CheckBox rad:GridViewGroupCheckUtilities.IsEnabled="True" IsThreeState="True" />
                            </StackPanel>
                        </DataTemplate>
                    </telerik:RadGridView.GroupHeaderTemplate>

                    <telerik:RadGridView.GroupDescriptors>
                        <telerik:GroupDescriptor Member="CategoryName"
                                                 SortDirection="Ascending">
                            <telerik:GroupDescriptor.AggregateFunctions>
                                <telerik:CountFunction />
                            </telerik:GroupDescriptor.AggregateFunctions>
                        </telerik:GroupDescriptor>
                    </telerik:RadGridView.GroupDescriptors>

.....

</telerik:RadGridView>

 

Hi. Guys.

I used the selectedItems, GroupHeaderTemplete using SDK Sample Browser provided by you.

I use Group Selection in the SDK sample list, but I want to change it to GroupDescriptors display Name, but it doesn't change.

Please check the image. Thx.

 

 

 

Psyduck
Top achievements
Rank 5
Bronze
Bronze
Bronze
 answered on 03 Dec 2020
10 answers
288 views

     Struggling to mimic the Grid View Exporting to Xlsx and Pdf example in the DEMO to understand how to build this function in a project. For the most part I have created the a working code but two things happens.

1) I get zero bit excel file.

2) In the code get System.ArgumentException "Please provide GridViewDataControl for exporting!". Sure enough in "var grid = param as RadGridView;" Param looks good bu the "grid" is null. Not sure how to over come.

When I run the demo program for the first time and open the xlsx file I'm getting something about the formatting is not correct... 

 
private void Export(object param)
        {
            var grid = param as RadGridView;
            var dialog = new SaveFileDialog()
            {
                DefaultExt = this.SelectedExportFormat,
                Filter = String.Format("(*.{0})|*.{1}", this.SelectedExportFormat, this.SelectedExportFormat)
            };
 
            if (dialog.ShowDialog() == true)
            {
                using (var stream = dialog.OpenFile())
                {
                    switch (this.SelectedExportFormat)
                    {
                        case "xlsx":
                            grid.ExportToXlsx(stream);
                            break;
                        case "pdf":
                            //grid.ExportToPdf(stream);
                            break;
                    }
                }
            }
        }
::
private void ExportDefaultStyles(object param)
        //private void ExportDefaultStyles(RadGridView param)
        {
            var grid = param as RadGridView;
            var exportOptions = new GridViewDocumentExportOptions()
            {
                ExportDefaultStyles = true,
                ShowColumnFooters = grid.ShowColumnFooters,
                ShowColumnHeaders = grid.ShowColumnHeaders,
                ShowGroupFooters = grid.ShowGroupFooters
            };
 
            var dialog = new SaveFileDialog()
            {
                DefaultExt = this.SelectedExportFormat,
                Filter = String.Format("(*.{0})|*.{1}", this.SelectedExportFormat, this.SelectedExportFormat)
            };
 
            if (dialog.ShowDialog() == true)
            {
                using (var stream = dialog.OpenFile())
                {
                    switch (this.SelectedExportFormat)
                    {
                        case "xlsx":
                            grid.ExportToXlsx(stream, exportOptions);
                            break;
                        case "pdf":
                            grid.ExportToPdf(stream, exportOptions);
                            break;
                    }
                }
            }
        }

In both methods I'm not correctly figuring out how to set the "grid" correctly so it can be passed down. It works this way in your demo.

Is there any way to download the demo to work on it locally?

Dilyan Traykov
Telerik team
 answered on 02 Dec 2020
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
PersistenceFramework
DataPager
Styling
TimeBar
OutlookBar
TransitionControl
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
ProgressBar
Sparkline
LayoutControl
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
PasswordBox
Rating
SplashScreen
Accessibility
Callout
CollectionNavigator
Localization
AutoSuggestBox
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?