Telerik Forums
UI for WPF Forum
4 answers
303 views

Hi,

I have a problem to define an animated texture to my RadDiagramConnection. If i define the texture inside style on my window, that's work but if i define texture in Resources, texture doesn't load.

This is my files :

Controls
|_ Entity
|   |_ Resources.xaml
|_ View
|    |_ Editor.xaml
|_ img
    |_ water.gif

 

This is my code who's working in Editor.xaml :

<telerik:RadDiagram x:Name="diagram2" Grid.Column="1" Grid.Row="1">
    <controls1:UniqEntity x:Name="container01" Position="150,150" />
    <telerik:RadDiagramContainerShape x:Name="container02" Position="500,150" />
    <telerik:RadDiagramConnection x:Name="connection01" Source="{Binding ElementName=container01}" Target="{Binding ElementName=container02}" Loaded="Connection01_OnLoaded" StrokeThickness="20">
        <Setter Property="Stroke">
            <Setter.Value>
                <VisualBrush>
                    <VisualBrush.Visual>
                        <Image gif:ImageBehavior.AnimatedSource="../img/water.gif" />
                    </VisualBrush.Visual>
                </VisualBrush>
            </Setter.Value>
        </Setter>
    </telerik:RadDiagramConnection>
</telerik:RadDiagram>

 

but if i define the style in Resources.xaml dictionnaries, the texture doesn't load :

    <Style x:Key="RadDiagramConnectionStyle" TargetType="telerik:RadDiagramConnection" />
    <Style BasedOn="{StaticResource RadDiagramConnectionStyle}" TargetType="telerik:RadDiagramConnection">
        <Setter Property="StrokeThickness" Value="10" />
        <Setter Property="Stroke">
            <Setter.Value>
                <VisualBrush>
                    <VisualBrush.Visual>
                        <Image gif:ImageBehavior.AnimatedSource="../../img/water.gif" />
                    </VisualBrush.Visual>
                </VisualBrush>
            </Setter.Value>
</Setter>
...

 

Can you help me please ?

Thanks !

Nicolas

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 04 Sep 2017
5 answers
215 views

How can I change the foreground color of the TimeSpanPickerComponent?

I've tried customizing my own RadTimeSpanPicker but unable to go pass the ItemsControl in the XAML (which contains a list of RadTimeSpanPickerComponents, e.g. hour/min/sec/etc picker, but not exposed via copied template. 

-----------------------------------------

                        <telerik:RadDropDownButton x:Name="PART_DropDownButton"

. . .
                            >
                            <telerik:RadDropDownButton.DropDownContent>
                                 . . .
                                    <ItemsControl
                                        ItemContainerStyle="{TemplateBinding TimeSpanComponentStyle}"
                                        Foreground="Red"
                                        Padding="3,0" Focusable="False" 
                                        >
                                        <ItemsControl.ItemsPanel>
                                            <ItemsPanelTemplate>
                                                <DockPanel Background="Transparent" IsItemsHost="True"/>
                                            </ItemsPanelTemplate>
                                        </ItemsControl.ItemsPanel>
                                    </ItemsControl>
                                   

---------------------------------------

I've also tried to set the Foreground via TimeSpanComponentStyle

TimeSpanComponentStyle="{DynamicResource TimeSpanComponentStyle1}"

 

I'd appreciate some assistance. Thanks.

-Elon

Dinko | Tech Support Engineer
Telerik team
 answered on 04 Sep 2017
1 answer
428 views

I used telerik WPF Radspreadsheet. 

I have a question that why you didn't make some excel formulas like SUBTOTAL, SUMIFS. (but in KENDO UI, they are already built in. )

 

Can I use these formulas another way in Radspreadsheet or Are you have any plans to built in those formulas in WPF Radspreadsheet? 

Tanya
Telerik team
 answered on 01 Sep 2017
1 answer
372 views

I am attempting to insert rows between existing rows within a worksheet. Each newly inserted row should have the cells within merged and have a text value.

I am basically calling the following in a loop on a very small spreadsheet (only 12 rows and 4 columns) and it is very slow. The spreadsheet originates from a call to grid.ExportToWorkbook().

 

 

worksheet.Rows.Insert(rowIndex, 1);

worksheet.Cells[rowIndex, 0].SetValueAsText("haha");

worksheet.Cells[new CellIndex(rowIndex, 0), new CellIndex(rowIndex, 3)].Merge();

 

Two issues:

Issue 1: This is very slow. Each call to insert takes a long time to execute. The entire operation takes several seconds despite only inserting 12 rows. I have suspended layout, put everything in a single undo group. The control isn't even visible at this point.

 

Issue 2: The cells do not seem to be merging correctly. Some of the values of non inserted rows are removed. If I comment out the call to merge, all values appear to be correct

 

Thanks in advance.

 

Tanya
Telerik team
 answered on 01 Sep 2017
8 answers
190 views

Hi,

I am trying to set the orientation of the minimized items in the bottom panel, so instead of being horizontally oriented I want them to be vertically oriented.

(see attached PNG file)

 

I though that the best approach would be to edit a copy of the TileViewPanel template/style and change it but I am unable to create a copy of it neither using Blend nor Visual Studio. 

 

So, is there any easy way to set the orientation of the minimized panel? If not, could you please provide me with a copy of the TileViewPanel template?

 

Thanks in advance.

Martin Ivanov
Telerik team
 answered on 01 Sep 2017
5 answers
403 views
I've managed some fairly complicated controls, using RadDataForm, but now I'm trying something very simple, and it's not working.

The issue: I'm trying to create a user control that contains a RadDataForm that edits one object.  There's no readonly, no newitem, no selection of previous or next, there's one single object that should always be displayed in edit mode.

So, I declare a RadDataForm, and bind CurrentItem, but don't bind ItemsSource, and set AutoEdit="True":
<telerik:RadDataForm
    x:Name="radDataForm"
    CurrentItem="{Binding Path=DataContext.recordData,
                    RelativeSource={RelativeSource AncestorType=UserControl},
                    Converter={StaticResource debugBindingConverter}}"
    EditTemplate="{StaticResource editTemplate}"
    ReadOnlyTemplate="{StaticResource readonlyTemplate}"
    AutoEdit="True"
    AutoGenerateFields="False"
    />

The two templates at this point simply contain labels, declaring "EditItemplate" and "ReadonlyTemplate", so I can see which is being loaded. The code-behind is simple:
public partial class MyUserControl : KorUserControl
{
    public MyUserControl()
    {
        InitializeComponent();
        this.DataContext = new MyUserControlVM();
    }
}
 
public class MyUserControlVM
{
    public RecordData recordData
    { get; set; }
 
    public MyUserControlVM()
    {
        this.recordData = new RecordData();
    }
}
 
public class RecordData : INotifyPropertyChanged, IDataErrorInfo, IEditableObject
{
    public string aTestField
    { get; set; }
         
    #region INotifyPropertyChanged Members
    ...
    #endregion
 
    #region IDataErrorInfo Members
    ...
    #endregion
 
    #region IEditableObject Members
    ...
    #endregion
}

My problem? The form loads the readonly template, instead of the edit template.

Why?
Stefan
Telerik team
 answered on 31 Aug 2017
2 answers
113 views

When using HeaderTextWrapping and FilteringMode.FilterRow the headers does not look consistent. The filter-rows should take up the same height on all columns. This looks the same for several styles.

Solution: The GridViewHeaderRowTemplate contains a Grid named PART_OuterGrid, and it's second RowDefinition should have Auto-height.

Magnus
Top achievements
Rank 1
 answered on 31 Aug 2017
2 answers
95 views

For what it worth, playing around with the reminders example I found that it wouldn't open the appointment for edition when the "Open Item"  button is clicked.

I checked the git repository to see if this is already addressed, but the last update to this files is about 4 years old, so here is the trick:

 

It turns out that at the time where the scheduleview reference is passed to the ReminderViewModel constructor (via the ViewModel class constructor), it is null.

So I added a ScheduleView property to ViewModel as a fachade for the reminder's view model property:

        public RadScheduleView ScheduleView
        {
            get { return reminderViewModel.ScheduleView; }
            set { reminderViewModel.ScheduleView = value; }
        }

and set it again once the IntializeComponent() method is called in the Example window's constructor:

        public Example()
        {
            viewModel = new ViewModel(this.scheduleView);
            this.DataContext = viewModel;
            InitializeComponent();
            viewModel.ScheduleView = this.scheduleView;
        }

And presto! Now it works as expected.

 

Best regards.

Richard
Top achievements
Rank 1
Iron
 answered on 30 Aug 2017
2 answers
274 views

RadRichTextBox control is really a wonderful control, but their are problems when writing in Arabic (right to left). I could override those problems unless for a major problem; where if the user wanted to enclose an Arabic word within brackets, then the direction and position of brackets change, as shown in the attached image.

How to correct this abnormal behavior???!

Any help please !!!

thank you ...

 

①Dr Mostafa
Top achievements
Rank 1
 answered on 30 Aug 2017
1 answer
121 views

I have a case where the event handler that handles AppointmentSaving is invoked twice, but only every other time. It goes like this:

 

1) Find a calendar event

2) Drag the edge of the event to make it wider

3) Find a second event, and drag *that* event wider. AppointmentSaving will be called twice.

4) Repeat every other time. (2, 4, 6, 8, etc. with no end)

 

Here's the XAML setting up the event handler:

 

<i:EventTrigger
    EventName="AppointmentSaving">
    <vp:EventToCommandAction
        PassEventArgsToCommand="True"
        Command="{Binding HandleDowntimeSavingCommand, Mode=OneWay}" />
</i:EventTrigger>

 

Here's the event handler itself:

 

public ICommand HandleDowntimeSavingCommand => DelegateCommand.Create<AppointmentSavingEventArgs>(HandleDowntimeSaving);
internal void HandleDowntimeSaving(AppointmentSavingEventArgs eventArgs)
{
    var downtime = (DowntimeViewModel)eventArgs.Appointment;
    var numExceptionsRemoved = RemovePointlessExceptions(downtime);
    var numExceptionsConverted = ConvertExceptionsToIsolatedDowntimes(downtime);
    if (numExceptionsRemoved > 0 && numExceptionsConverted == 0)
    {
        eventArgs.Cancel = true;
    }
}

 

DelegateCommand.Create is used in literally thousands of places; it's not the source of the bug. If I set a breakpoint on the first line of the event handler, it will be hit twice, but only on every second edit.

Dilyan Traykov
Telerik team
 answered on 30 Aug 2017
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
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
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
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?