Telerik Forums
UI for WPF Forum
2 answers
126 views

Can i set the TreeListViewItem visibility to visible or hide, when i use the treelistiview in Virtualization model.

I want to use this method to search something,or may be another?

wang
Top achievements
Rank 1
 answered on 25 Jul 2019
4 answers
333 views
Hello Everyone,

I have users that can have 30 tiles on the RadTileList

I am trying to detect when the RadTileList is selected. Not the tiles inside the RadTileList.

The goal her, is to send the user back to the search textbox in the RadToolBar at the top.

I can't use  RadTileList_SelectionChanged since is not fired when not selecting a tile.

FocusManager.FocusedElement="{Binding ElementName=txtSearch}" doesn't work

and FocusManager.GotFocus="radTileLis_Focus" works once even if you click on a tile.

Is it possible to do that?

If so how?
Kermit
Top achievements
Rank 1
 answered on 24 Jul 2019
2 answers
136 views

Hi.

When clicked crop item and then directly press save button, cropped image is saved.It seems cropped result image save.

What i want  no cropping just save image. Please refer to the file for details.

How can i get uncropped image.

Please give me advise. 

Thanks reading this post.

Martin Ivanov
Telerik team
 answered on 24 Jul 2019
6 answers
361 views

Hi Telerik support team,

I have a TabbedWindow with RadTabItems generated dynamically from code behind. In each RadTabItem, there is frame that I navigated to a Page.

The trouble is that: When a user drags a tab out of a host TabbedWindow, if the drop is inside a RadTabItem (I meant users just drag out the header and drop inside a tab), the tab is not dragging out. In plus, since this moment, all drag-out is not working even drop area is outside a tab.

Many thanks for your support

Here is my code in C#:

var newRadTab = new RadTabItem();
newRadTab.HeaderTemplate = (DataTemplate)this.Resources["HeaderTemplate"];
var frame = new Frame() { Name = "displayMainContent" };
frame.NavigationUIVisibility = NavigationUIVisibility.Hidden;
frame.ContextMenu = new ContextMenu() { Visibility = Visibility.Hidden };
newRadTab.Content = frame;

 

And Xaml as below:

<telerik:RadTabbedWindow x:Class="WpfConcept.MainTabbedWindow" x:Name="radTabbedWindow"
        IsContentPreserved="False"
        xmlns:self="clr-namespace:WpfConcept"
        mc:Ignorable="d"  PreviewTabClosed="OnWindowPreviewClosed" PreviewClosed="radTabbedWindow_PreviewClosed"
        MinWidth="380" MinHeight="260"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Loaded="OnWindowLoaded"
        Width="1800" Height="1000" Header="Concept Family Office v.8.0.1"
        ItemsSource="{Binding Data}"
        DisplayMemberPath="Header" AddButtonVisibility="Hidden">
minh
Top achievements
Rank 2
Iron
Iron
Iron
 answered on 24 Jul 2019
2 answers
122 views

Hi,

I have a GridView with GridViewSelectColumn ,which have binded itemsource and seted selectionmode "Multiple".But the grid always have selected the fist value of itemsource and the selecteditem is same value.

 My expectation is nothing selected,how to solve it.

Regards,
Guo

Dilyan Traykov
Telerik team
 answered on 24 Jul 2019
1 answer
484 views

Hello,

I'm trying to implement GIF for my GridView but it isn't animated. Does GridView support GIFs?

My example:

<Window
        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:local="clr-namespace:NotWorkingGif"
        xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" x:Class="NotWorkingGif.MainWindow"
        mc:Ignorable="d"
        DataContext="{Binding RelativeSource={RelativeSource Self}}"
        Title="MainWindow" Height="450" Width="800">
    <Grid>
        <telerik:RadGridView ItemsSource="{Binding Collection}" AutoGenerateColumns="False">
            <telerik:RadGridView.Columns>
                <telerik:GridViewImageColumn DataMemberBinding="{Binding ImageUri}" Header="" ImageStretch="None" ImageHeight="16" ImageWidth="16" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
</Window>

namespace NotWorkingGif
{
    using System;
    using System.Collections.ObjectModel;
    using System.ComponentModel;
    using System.Windows;

    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public ObservableCollection<TestClass> Collection { get; set; } = new ObservableCollection<TestClass>();

        public MainWindow()
        {
            InitializeComponent();

            this.Collection.Add(new TestClass() { ImageUri = new Uri(@"path to GIF image") });
        }
    }

    public class TestClass : INotifyPropertyChanged
    {
        private Uri imageUri;
        public Uri ImageUri
        {
            get => imageUri;

            set
            {
                imageUri = value;
                this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs("ImageUri"));
            }
        }

        public event PropertyChangedEventHandler PropertyChanged;
    }
}


Dilyan Traykov
Telerik team
 answered on 24 Jul 2019
3 answers
711 views
Hello,
I have a RadAutocompleteBox and I'm looking for a way to select all text on focus.
I looked for SelectAll() method but there's not one. Is there a way to do this?

Thank you in advance
Best regards
Fabio
Dilyan Traykov
Telerik team
 answered on 24 Jul 2019
5 answers
216 views

Hello,

We are evaluating the PropertyGrid control and have a few questions.

1. When using Nested Properties, I am overriding ToString to display the child property values in the parent. However how do I get this string to update when the child properties are updated?

2. Is there a way to conditionally disable properties based on the values of other properties?

3. When using the Editor attribute with the EditorStyle.Modal option, is there a way to control the start position of the modal?

 

Thanks,
Hayley

Yoan
Telerik team
 answered on 24 Jul 2019
9 answers
457 views

When I create a PointSeries chart, the point's color is determined at moment the chart is showing. But I want the point's color changed with the datasource's some content after the chart was  shown.

So I make a new PlotInfo class shown as below, and  I set DefaultVisualMaterialSelector bind to PlotInfo's ColorFlag, with a Converter.
Finally, the project doesn't work, the point's color didn't change when I modify the ColorFlag.
So does ChartView3D support this kind of abbility? And how can I get what I want?

public class PlotInfo : INotifyPropertyChanged
{
    public event PropertyChangedEventHandler PropertyChanged;
    public double XValue { get; set; }
    public double YValue { get; set; }
    public string ZValue { get; set; }
    private string m_sColorFlag;
    public string ColorFlag
    {
        get { return m_sColorFlag;}
        set
        {
            m_sColorFlag = value;
            if(this.PropertyChanged != null)
            {
                PropertyChanged.Invoke(this, new PropertyChangedEventArgs("ColorFlag"));
            }
        }
    }
}

MainWindow.xaml

<Window x:Class="VariableMaterial.MainWindow"
        xmlns:local="clr-namespace:VariableMaterial"
        mc:Ignorable="d"
        Title="MainWindow" Height="350" Width="525">
    <Window.Resources>
        <local:ColorConvert x:Key="myColorConvert" />
    </Window.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <ToolBar Grid.Row="0" Height="auto">
            <Button Content="SetColorFlag=A" Click="ButtonA_Click" Margin="10,0,0,0"/>
            <Button Content="SetColorFlag=B" Click="ButtonB_Click" Margin="10,0,0,0"/>
        </ToolBar>       
        <telerik:RadCartesianChart3D Grid.Row="1">
            <telerik:RadCartesianChart3D.XAxis>
                <telerik:LinearAxis3D />
            </telerik:RadCartesianChart3D.XAxis>
            <telerik:RadCartesianChart3D.YAxis>
                <telerik:LinearAxis3D />
            </telerik:RadCartesianChart3D.YAxis>
            <telerik:RadCartesianChart3D.ZAxis>
                <telerik:CategoricalAxis3D />
            </telerik:RadCartesianChart3D.ZAxis>
            <telerik:RadCartesianChart3D.Series>
                <telerik:PointSeries3D PointSize="100"
                                       DefaultVisualMaterialSelector="{Binding ColorFlag, Converter={StaticResource myColorConvert}}"
                                       XValueBinding="XValue"
                                       YValueBinding="YValue"
                                       ZValueBinding="ZValue"
                                       ItemsSource="{Binding}"/>
            </telerik:RadCartesianChart3D.Series>
            <telerik:RadCartesianChart3D.Grid>
                <telerik:CartesianChart3DGrid />
            </telerik:RadCartesianChart3D.Grid>
            <telerik:RadCartesianChart3D.Behaviors>
                <telerik:Chart3DCameraBehavior />
            </telerik:RadCartesianChart3D.Behaviors>
        </telerik:RadCartesianChart3D>
    </Grid>
</Window>

 

MainWindow.xaml.cs

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
using System.Windows.Media;
using System.Windows.Media.Media3D;
 
 
namespace VariableMaterial
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public ObservableCollection<PlotInfo> source = new ObservableCollection<PlotInfo>();
        public MainWindow()
        {
            InitializeComponent();
 
            PlotInfo info1 = new PlotInfo()
            {
                XValue = 1,
                YValue = 1,
                ZValue = "A",
                ColorFlag = "A",
            };
 
            PlotInfo info2 = new PlotInfo()
            {
                XValue = 2,
                YValue = 2,
                ZValue = "B",
                ColorFlag = "B",
            };
 
            source.Add(info1);
            source.Add(info2);
 
            this.DataContext = source;
        }
 
        private void ButtonA_Click(object sender, RoutedEventArgs e)
        {
            source[0].ColorFlag = "B";
        }
 
        private void ButtonB_Click(object sender, RoutedEventArgs e)
        {
            source[1].ColorFlag = "A";
        }
    }
 
    public class ColorConvert : IValueConverter
    {
        private Dictionary<Color, Material> colorToMaterialDict = new Dictionary<Color, Material>();
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            string colorFlag = (string)value;
            Color color;
 
            if (colorFlag == "A")
            {
                color = (Color)ColorConverter.ConvertFromString("#007ACC");
            }
            else
            {
                color = (Color)ColorConverter.ConvertFromString("#68217A");
            }
 
            Material material;
            if (!this.colorToMaterialDict.TryGetValue(color, out material))
            {
                material = new DiffuseMaterial(new SolidColorBrush(color));
                colorToMaterialDict[color] = material;
            }
                 
            return material;
        }
 
        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}

 

Star
Top achievements
Rank 1
 answered on 23 Jul 2019
4 answers
287 views

Hi I am building a custom Filtering Control which allows users to resize the control. Interacting with the thumbs to resize is working but,I have noticed that when i click on the main  FilteringControl the whole Custom control will closes which means i can't filter my data :( .  How can i stop this from occurring? Thanks in advance.

<UserControl x:Class="MyControls.Views.ResizableFilteringControl.ResizableFilteringControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
             mc:Ignorable="d" 
             d:DesignHeight="500" d:DesignWidth="500" >
    <UserControl.Resources>

    </UserControl.Resources>

    <Grid>
        <StackPanel Margin="18" Background="White">
          
        <telerik:FilteringControl Name="FilteringControl"></telerik:FilteringControl>
            <Grid>
                <Thumb Name="SouthEastThumb"
                   HorizontalAlignment="Left" 
                   VerticalAlignment="Bottom" 
                   Width="16" Height="16" 
                   MouseEnter="OnMouseEnter"
                   DragStarted="OnDragStarted" 
                   DragDelta="OnDragDelta" 
                   DragCompleted="OnDragCompleted"/>
                <Thumb Name="SouthWestThumb"
                   HorizontalAlignment="Right" 
                   VerticalAlignment="Bottom" 
                   Width="16" Height="16" 
                   MouseEnter="OnMouseEnter"
                   DragStarted="OnDragStarted" 
                   DragDelta="OnDragDelta" 
                   DragCompleted="OnDragCompleted"/>
            </Grid>  
        
        
        </StackPanel>
    </Grid>
</UserControl>

 

 

Code behind:

 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Controls.Primitives;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using DevExpress.Xpf.Core;
using DevExpress.Xpf.Core.Native;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.GridView;
using GridViewColumn = Telerik.Windows.Controls.GridViewColumn;


namespace MyControls.Views.ResizableFilteringControl
{
    /// <summary>
    /// Interaction logic for ResizableFilteringControl.xaml
    /// </summary>
    public partial class ResizableFilteringControl : IFilteringControl
    {
        //TODO fix issue with control not remiaing open when i click on the FilteringControl.
        //TODO add style to Thumbs.
        public ResizableFilteringControl()
        {
            InitializeComponent();
        }

        public void Prepare(GridViewColumn columnToPrepare)
        {
            this.FilteringControl?.Prepare(columnToPrepare);
         
        }

        public bool IsActive
        {
            get { return (bool)GetValue(IsActiveProperty); }
            set { SetValue(IsActiveProperty, value); }
        }

        /// <summary>
        /// Identifies the <see cref="IsActive"/> dependency property.
        /// </summary>
        public static readonly DependencyProperty IsActiveProperty =
            DependencyProperty.Register(
                "IsActive",
                typeof(bool),
                typeof(ResizableFilteringControl),
                new System.Windows.PropertyMetadata(false));

        private void OnDragStarted(object sender, DragStartedEventArgs e)

        {
            SetCursor(sender);
        }

        private void OnDragDelta(object sender, DragDeltaEventArgs e)

        {
            //TODO make resize to left.
            
            var yadjust = FilteringControl.RenderSize.Height + e.VerticalChange;
            var xadjust = this.FilteringControl.RenderSize.Width + e.HorizontalChange;

            if (IsResizeAllowed(xadjust, yadjust))

            {
                this.FilteringControl.Width = xadjust;
                this.FilteringControl.Height = yadjust;
            }
        }

        private static bool IsResizeAllowed(double xadjust, double yadjust)
        {
            //TODO let consumer specify these values so they are not hard coded.
            return (xadjust >= 50 && yadjust >= 50) &&
                   (xadjust <= 800 && yadjust <= 800);
        }

        private void OnDragCompleted(object sender, DragCompletedEventArgs e)
        {
            var t = (Thumb)sender;
            t.Cursor = null;
        }
        
        private void OnMouseEnter(object sender, MouseEventArgs e)
        {
            SetCursor(sender);
        }

        private static void SetCursor(object sender)
        {
            var thumb =  sender as Thumb;
            if (thumb != null)
            {
                if (thumb.Name == "SouthWestThumb")
                {
                    thumb.Cursor = Cursors.SizeNWSE;
                }
                else if (thumb.Name == "SouthEastThumb")
                {
                    thumb.Cursor = Cursors.SizeNESW;
                }
                else
                {
                    thumb.Cursor = null;
                }
            }         
        }
    }
}

Christian
Top achievements
Rank 1
 answered on 23 Jul 2019
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
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
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
SplashScreen
Callout
Rating
Accessibility
CollectionNavigator
Localization
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?