Telerik Forums
UI for WPF Forum
2 answers
248 views

I'm trying to implement the custom Drag Drop behavior depicted at this link: https://docs.telerik.com/devtools/wpf/controls/radtaskboard/features/taskboardcolumndragdropbehavior#taskboardcolumndragdropbehavior

 However I cannot get the XAML to recognize this item 

<telerik:RadTaskBoard.DragDropBehavior>

 

The error message is 'The member "DragDropBehavior" is not recognized or is not accessible.

Regards,

Brian
Top achievements
Rank 1
Veteran
 answered on 24 Apr 2020
2 answers
327 views

How to make the Rad NavigationView control translucent, as shown in the WPF demo app, any idea?

 

Thank you for your attention

Electrónica GOIA
Top achievements
Rank 2
 answered on 24 Apr 2020
2 answers
170 views

Hi,

I'm working on an application that uses the TaskBoard and have encountered an issue when updating the State property of the TaskBoardCardModel. When the State is updated via binding should the card not move to the appropriate column?

To reproduce the issue I've provided the XAML and view model code for your review.

<Window
                xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
                xmlns:local="clr-namespace:TaskBoardIssue" x:Class="TaskBoardIssue.MainWindow"
                Title="MainWindow" Height="350" Width="525"
                WindowState="Maximized"
    >
    <Window.DataContext>
        <local:TaskBoardVM/>
    </Window.DataContext>
    <Grid>
 
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="5*"/>
            <ColumnDefinition Width="Auto"/>
        </Grid.ColumnDefinitions>
 
        <StackPanel Grid.Column="1"
                    Orientation="Vertical">
 
            <Button Content="Add New Model"
                    Margin="3"
                    Command="{Binding AddModel}"
                    />
 
            <Button Content="Update State"
                    Margin="3"
                    Command="{Binding UpdateModel}"
                    />
             
            <telerik:RadPropertyGrid
                Item="{Binding TestModel}"
                />
 
        </StackPanel>
 
        <telerik:RadTaskBoard
            ItemsSource="{Binding MyTasks}"
            GroupMemberPath="State"
            AutoGenerateColumns="True"
            />
 
    </Grid>
</Window>

 

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Input;
using Telerik.Windows.Controls;
using Telerik.Windows.Controls.TaskBoard;
 
namespace TaskBoardIssue
{
    public class TaskBoardVM : INotifyPropertyChanged
    {
        public event PropertyChangedEventHandler PropertyChanged;
 
 
        ObservableCollection<TaskBoardCardModel> myTasks;
 
        public ObservableCollection<TaskBoardCardModel> MyTasks { get; set; }
 
 
        private TaskBoardCardModel testModel;
 
        public TaskBoardCardModel TestModel
        {
            get { return testModel; }
            set
            {
                if (testModel != null)
                    if (testModel.Equals(value))
                        return;
 
                testModel = value;
                this.PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(nameof(TestModel)));
            }
        }
 
 
        public TaskBoardVM()
        {
            TestModel = new TaskBoardCardModel() { Assignee = "Alpha", Title = "Title Text", Description = "Description Text", State = "Backlog"};
 
            MyTasks = new ObservableCollection<TaskBoardCardModel>()
            {
                new TaskBoardCardModel(){ Assignee = "Alpha", Title = "Title Text", Description = "Description Text", State = "Backlog"},
                new TaskBoardCardModel(){ Assignee = "Alpha", Title = "Title Text", Description = "Description Text", State = "Active"},
                new TaskBoardCardModel(){ Assignee = "Alpha", Title = "Title Text", Description = "Description Text", State = "Complete"},
            };
 
            AddModel = new DelegateCommand(InsertTestModel, canBeExecuted);
            UpdateModel = new DelegateCommand(UpdateTestModel, canBeExecuted);
            this.CanExecuteCommand = true;
        }
 
 
        public bool CanExecuteCommand { get; set; }
        public ICommand AddModel { get; set; }
        public ICommand UpdateModel { get; set; }
 
 
        private bool canBeExecuted(object obj)
        {
            return this.CanExecuteCommand;
        }
 
        private void InsertTestModel(object obj)
        {
            MyTasks.Add(TestModel);
            this.PropertyChanged(this, new PropertyChangedEventArgs(nameof(MyTasks)));
        }
 
        private void UpdateTestModel(object arg)
        {
            TestModel.State = "Active";
        }
 
    }
}

 

If you build and run the application, click the 'Add New Model' and you can see the model being added to the appropriate column. However when you click 'Update Model' you can see the State property does update (see Property Grid), but the Task Card does not move to the correct column.

Regards,

 

Brian
Top achievements
Rank 1
Veteran
 answered on 24 Apr 2020
3 answers
224 views

Hello,

 

Can you please let me know how we can hide all worksheets in a workbook except for the active worksheet?

 

Thanks

Martin
Telerik team
 answered on 24 Apr 2020
3 answers
377 views

Hi,

i'm using RadBusyIndicator to show "sub views" in our applications main window as BusyContent using BusyContentTemplate and it works.

The problem that i'm having is that the content presenter has locally assigned margin value that i haven't succeeded to override.

What i've tried?

1.) Tried to override the margin with implicit style in resources of RadBusyIndicator with no luck (not also preferred method because of all child content presenters get affected)

2.) Wrote a new custom control that derives from RadBusyIndicator and gave it a "NewMargin" dependency property of type Thickness. When the value of "NewMargin" changes i use VisualTreeHelpers to get the content presenter from visual tree and assing the new value to content presenter, but somehow it doesn't work either. The value gets set but the the view doesn't reflect the change.

The derived indicator:

    public class AdaBusyIndicator : RadBusyIndicator
    {
        public static readonly DependencyProperty NewMarginProperty =
          DependencyProperty.Register("NewMargin", typeof(Thickness),
        typeof(AdaBusyIndicator), new UIPropertyMetadata(new Thickness(), NewMarginPropertyChanged));

        private static void NewMarginPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
            if (d is AdaBusyIndicator abi && VisualTreeHelpers.FindChild<Border>(abi, "Indicator") is Border brd &&
                VisualTreeHelpers.FindChild<ContentPresenter>(brd) is ContentPresenter cpres && e.NewValue is Thickness newThickness)
            {
                Thickness thickness = new Thickness(newThickness.Left, newThickness.Top, newThickness.Right, newThickness.Bottom);

                cpres.Margin = thickness;
            }
        }

        public Thickness NewMargin
        {
            get
            {
                return (Thickness)GetValue(NewMarginProperty);
            }
            set
            {
                SetValue(NewMarginProperty, value);
            }
        }
    }

 

Vicky
Telerik team
 answered on 24 Apr 2020
3 answers
943 views

Hello Diagramers,

Can anyone provide advice on how to export the SVG Path from an Illustrator generated SVG file for use in a RadDiagram shape? This works on simple, eg single path shapes using GIMP to export the image path but it does not work for multiple path shapes, eg a rectangle with a domed end. In the latter case the shape displays correctly but mouse clicks are processed over the domed portion and ignored over the rest of the shape. I've attached my Path data and a screen shot of the resulting shape in the hope that someone can shed some light on why I'm getting this behavior.

 

Regards,

Eric Gilbertson

 

<Style TargetType="{x:Type telerik:RadDiagramShape}" x:Key="ClipGraphBranchCell">
        <Setter Property="Background" Value= "Green"/>
        <Setter Property="BorderBrush" Value= "Black"/>
        <Setter Property="Geometry" Value=" M 139.54,3.30 C 137.45,1.11 134.53,0.00 130.72,0.00
             130.72,0.00 8.77,0.00 8.77,0.00
             3.93,0.01 0.01,4.01 -0.00,8.94
             -0.00,8.94 0.00,13.03 0.00,13.03
             0.01,17.97 3.93,21.97 8.77,21.98
             8.77,21.98 130.98,21.98 130.98,21.98
             130.98,21.98 131.60,21.98 131.60,21.98
             134.72,21.97 137.55,20.69 139.62,18.63
             139.62,18.63 146.05,10.97 146.05,10.97
             146.05,10.97 139.54,3.30 139.54,3.30 Z
M 1.50,13.03 C 1.51,17.13 4.76,20.44 8.77,20.45
             8.77,20.45 130.98,20.45 130.98,20.45
             131.15,20.46 131.32,20.46 131.50,20.46
             133.75,20.46 135.83,19.69 137.49,18.40
             137.49,18.40 137.49,3.52 137.49,3.52
             135.72,2.26 133.56,1.52 131.23,1.52
             131.06,1.52 130.89,1.53 130.72,1.53
             130.72,1.53 8.77,1.53 8.77,1.53
             4.76,1.54 1.51,4.85 1.50,8.95
             1.50,8.95 1.50,13.03 1.50,13.03 Z" />
        <Setter Property="IsEditable" Value="False"/>
        <Style.Triggers>
            <Trigger Property="IsSelected" Value="true">
                <Setter Property="Background" Value="Green" />
                <Setter Property="BorderBrush" Value="White"/>
            </Trigger>
        </Style.Triggers>
    </Style>

 

Dinko | Tech Support Engineer
Telerik team
 answered on 24 Apr 2020
3 answers
159 views

Hello,

I am using RadRichTextBox with 3 basic style definitions only. I dont want allow users to use more, this is requirement. I achieved the expected behavior except one situation, pasting content that contains styles from MS Word. I would like to not load Style Definitions from pasted content to RadRichTextBox. My idea was to reload my 3 basic style definitions after paste command executed, because then StyleRepository contains more of them:

private void Editor_CommandExecuted(object sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutedEventArgs e)
        {
            if (e.Command is PasteCommand)
            {
                var styl1 = this.Editor.Document.StyleRepository.ElementAtOrDefault(0);
                var styl2 = this.Editor.Document.StyleRepository.ElementAtOrDefault(1);
                var styl3 = this.Editor.Document.StyleRepository.ElementAtOrDefault(2);
 
                this.Editor.Document.StyleRepository.Clear();
 
                this.Editor.Document.StyleRepository.Add(styl1);
                this.Editor.Document.StyleRepository.Add(styl2);
                this.Editor.Document.StyleRepository.Add(styl3);
            }
        }

 

and this works almost ok. When saving this and opening again text is not styled.

But right after paste, after removing this additional styles from pasted content, the pasted content still looks like it has this Style Definitions applied.

Document doesn't have style definitions in collection and RadRichTextBox still shows styled content.

Is it problem with refreshing RadRichTextBox after manual operations on StyleRepository?

Dimitar
Telerik team
 answered on 24 Apr 2020
9 answers
2.6K+ views

Hi.

I have a grid with FilterDescriptors set to a property on the items in the grid.

<telerik:RadGridView x:Name="ContractNoteGridView"
ItemsSource="{Binding ContractNotes}">
<telerik:RadGridView.FilterDescriptors>
<telerik:FilterDescriptor Member="IsEcoGenerated" Operator="IsEqualTo" Value="false" />
</telerik:RadGridView.FilterDescriptors>
<telerik:RadGridView.Columns>
<telerik:GridViewDataColumn Header="Dok.Nr." DataMemberBinding="{Binding DocumentNumber}" />
<telerik:GridViewDataColumn Header="Dato" DataMemberBinding="{Binding Date, StringFormat={}{0:dd.MM.yyyy}}" />
<telerik:GridViewDataColumn Header="Eco" DataMemberBinding="{Binding IsEcoGenerated}" />
</telerik:RadGridView.Columns>
</telerik:RadGridView>

The filter is working ok when the GridView is loaded, item's are showing or not based on the property 'IsEcoGenerated'. The problem is that the GridView is not updated and removing item's if I set the property 'IsEcoGenerated' to true on one (or several) of the items. The GridViewDataColumn containing the same property does change though.

The collection used in the ItemSource (ContractNotes) is an ObservableCollection of objects of type ContracNote. ContractNote has the property IsEcoGenerated, and it implements INotifyPropertyChange , the NotifyPropertyChanged is also triggered on the setter of the property.

Can you give me a hint on what I'm doing wrong, or what I need to do to get the grid to update/refresh? The command that sets the property 'IsEcoGenerated' is a command on the ViewModel.

Martin Ivanov
Telerik team
 answered on 24 Apr 2020
0 answers
122 views

Hello,

we need to be able to add a new row into the TreeView and immediately see it, even when column filters or sorts are applied (so that a user does not have to scroll around searching for it or to disable filters in order to see the new row at all).

We could clear the filters/sorts before the insert, but we do not want to lose these settings and we do not want to change the displayed rows. The new row can be later, after the cells are filled, filtered/sorted according to the current settings, but just not in the moment of insert/first data entry.

How could we achieve this using TreeView? Note: we use "GridViewNewRowPosition.None", the row is inserted programmatically beside the currently selected one.

Thanks.

Robert
Top achievements
Rank 1
 asked on 22 Apr 2020
1 answer
248 views
I am use the MultiColumnComboBox for a custom property definition in a RadPropertyGrid using the PropertyDefinition.EditorTemplate, but I can't find a way to make the MCCB width autosize to the value column width of the PropertyGrid.  The width property only accepts Auto and constants (not *).  Is there a way to do this?
Vladimir Stoyanov
Telerik team
 answered on 22 Apr 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
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
WatermarkTextBox
DesktopAlert
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
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Edmond
Top achievements
Rank 1
Iron
fabrizio
Top achievements
Rank 2
Iron
Veteran
RobMarz
Top achievements
Rank 2
Iron
Fakhrul
Top achievements
Rank 1
Iron
Tejas
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?