Telerik Forums
UI for WPF Forum
3 answers
172 views

  We need to change the appointment height per appointment in the RadScheduleView timeline view. Since we have multiple appointment types

with different information (amount of information), we need to change the size. We don't want scrollable content.

So my plan was to set the MinAppointmentHeight to the smallest appointment and than scale them. But if I set the MinAppointmentHeight,

all appointments just have the same size. Event if we change it in the style.

 

Thanks a lot!

Dinko | Tech Support Engineer
Telerik team
 answered on 05 Mar 2020
1 answer
106 views
I am using Telerik RadGridView for WPF. I have a scenario where a user types some value in the RadGridView cell and then clicks on the save button. I want to get the updated value that the user just typed in the cell. When I tab-out from the cell then I can get the updated value in CellEditEnded event. But in my scenario I don't want to tab-out from the RadGridView cell.
Martin Ivanov
Telerik team
 answered on 04 Mar 2020
7 answers
1.6K+ views

Hi,

I'm disappointed to not successfully bind a column on a custom object: is it possible to display a custom object in a cell of a grid ?

If i use DataMemberBinding jointly with CellTemplate, the dataContext of the gridviewcell is not my property but still the 'row object':

Is GridViewDataColumn's purpose to bind on 'simple properties' ?

Thanks a lot,

Example: The 2nd column doesn't display the button content neither bind the command because the datacontext of the cell is still a 'Row' object and not and 'Item' object.

 

Code:

public class MyViewModel : Telerik.Windows.Controls.ViewModelBase
    {
        public MyViewModel()
        {
            this.ItemsSource = new ObservableCollection<Row>()
            {
                new Row() { RowName = "Row 1" },
                new Row() { RowName = "Row 2" },
                new Row() { RowName = "Row 3" },
            };
        }
 
        public ObservableCollection<Row> ItemsSource { get; set; }
    }
 
    public class Row
    {
        public Row()
        {
            this.Item = new Item();
        }
 
        public Item Item { get; private set; }
        public string RowName { get; set; }
    }
 
    public class Item
    {
        private static Random rnd = new Random();
 
        public Item()
        {
            this.Display = string.Format("Item {0}", rnd.Next(1, 999));
            this.FireItem = new Telerik.Windows.Controls.DelegateCommand((object o) =>
            {
                System.Diagnostics.Debug.WriteLine("Double click on " + this.Display);
            });
        }
 
        public string Display { get; set; }
 
        public ICommand FireItem { get; set; }
    }

 

Xaml : 

<Window.Resources>
        <local:MyViewModel x:Key="MyViewModel" />
        <DataTemplate x:Key="ItemTemplate">
            <Button Width="75"
                    Height="75"
                    Command="{Binding FireItem}"
                    Content="{Binding Display}" />
        </DataTemplate>
    </Window.Resources>
    <Grid>
        <telerik:RadGridView AutoGenerateColumns="False"
                             DataContext="{Binding Source={StaticResource MyViewModel}}"
                             IsReadOnly="True"
                             ItemsSource="{Binding ItemsSource}">
            <telerik:RadGridView.Columns>
                <telerik:GridViewDataColumn DataMemberBinding="{Binding RowName}"
                                            Header="Stage" />
 
                <telerik:GridViewDataColumn CellTemplate="{StaticResource ItemTemplate}"
                                            DataMemberBinding="{Binding Item}"
                                            Header="Item" />
            </telerik:RadGridView.Columns>
        </telerik:RadGridView>
    </Grid>
Yoan
Telerik team
 answered on 04 Mar 2020
3 answers
242 views

Please, I need show a RadWindow inside to RadNavigationView.

 

Could you help me!

Vicky
Telerik team
 answered on 04 Mar 2020
4 answers
796 views

Hello
What are the possible drawbacks of disabling the AutomationManager?

AutomationManager.AutomationMode = AutomationMode.Disabled;

It drastically improved shape manipulation. It was extremelly slow when resizing and creating shapes before changing the AutomationMode.

My question is, what is this for? What am I losing by disabling it? I've read the documentation but didn't understand it well.

Thank you!!

 

Alexander
Top achievements
Rank 1
 answered on 04 Mar 2020
1 answer
93 views

Hi,
We are trying to port the existing .net framework WPF application with Telerik packages to .net Core WPF application. And we are using the Telerik latest stable version for the .net framework. While checking for Portability analysis we found some of the assemblies are missing in .net Core.
  Telerik.Windows.Controls
  Telerik.Windows.Controls.Diagrams 
  Telerik.Windows.Controls.GridView 
  Telerik.Windows.Controls.Input 
  Telerik.Windows.Controls.Navigation
  Telerik.Windows.Controls.RibbonView 
  Telerik.Windows.Data
  Telerik.Windows.Diagrams.Core 
Kindly help us out in this issue.

 

Thank you

Vladimir Stoyanov
Telerik team
 answered on 04 Mar 2020
4 answers
818 views

Hi,

why is this working:

<telerik:RadRibbonWindow
    x:Class="N4W.App.GuiLayer.Modules.OperatingCostsModule.Views.ProceedTest"
    xmlns:local="clr-namespace:N4W.App.GuiLayer.Modules.OperatingCostsModule.Views"
    mc:Ignorable="d" Height="200" Width="400"
    d:DesignHeight="450" d:DesignWidth="800">
 
    <telerik:RadRibbonWindow.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <!--<ResourceDictionary>
                    <Style TargetType="local:ProceedTest" BasedOn="{StaticResource RadRibbonWindowStyle}" />
                </ResourceDictionary>-->                                          
 
                <ResourceDictionary Source="RibbonWindowStyle.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </telerik:RadRibbonWindow.Resources>
    <Grid>
        <TextBlock Text="Hallo" />
    </Grid>
</telerik:RadRibbonWindow>

where the content of RibbonWindowStyle.xaml is:

                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:N4W.App.GuiLayer.Modules.OperatingCostsModule.Views"
                    >
     
    <Style TargetType="local:ProceedTest" BasedOn="{StaticResource RadRibbonWindowStyle}" />
 
</ResourceDictionary>

pic RadWindow2.jpg

 

and this is not working:

<telerik:RadRibbonWindow
    x:Class="N4W.App.GuiLayer.Modules.OperatingCostsModule.Views.ProceedTest"
    xmlns:local="clr-namespace:N4W.App.GuiLayer.Modules.OperatingCostsModule.Views"
    mc:Ignorable="d" Height="200" Width="400"
    d:DesignHeight="450" d:DesignWidth="800">
 
    <telerik:RadRibbonWindow.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary>
                    <Style TargetType="local:ProceedTest" BasedOn="{StaticResource RadRibbonWindowStyle}" />
                </ResourceDictionary>                                          
 
                <!--<ResourceDictionary Source="RibbonWindowStyle.xaml" />-->
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </telerik:RadRibbonWindow.Resources>
    <Grid>
        <TextBlock Text="Hallo" />
    </Grid>
</telerik:RadRibbonWindow>

pic RadWindow1.jpg

 

For me both versions should end up in the same result, or what is the difference?!

 

BR Gert

 

 

 

 

 

Gert
Top achievements
Rank 1
 answered on 04 Mar 2020
8 answers
131 views

I am using the latest release. I have this code -- I even tried manually forcing the selection, but it didn't help any:

Workbook spreadsheetWorkbook = new XlsxFormatProvider( ).Import( result );
 
//I tried to force the active worksheet, but this doesn't help either!
spreadsheetWorkbook.ActiveWorksheet = spreadsheetWorkbook.Worksheets.FirstOrDefault( );
 
foreach ( var sheet in spreadsheetWorkbook.Worksheets )
{
    sheet.ViewState.IsSelected = false;
}
 
if ( spreadsheetWorkbook.ActiveWorksheet != null )
{
    spreadsheetWorkbook.ActiveWorksheet.ViewState.IsSelected = true;
}
 
spreadsheet.Workbook = spreadsheetWorkbook;

 

And the result is attached. 

 

Please advise...

Regards,

 

Dimitar
Telerik team
 answered on 04 Mar 2020
6 answers
974 views

Hi,

is it possible to change the full text search behavior from contains to start with?

The users whant e.g. to search vor zip codes and they do not want to see a lot of other results... pls see attached pic.

 

If it is possible is it also possible to switch the behavior at run time? Than I could provide a checkbox where the user can switch back to "contains-mode".

 

Thanks for help!!!

BR Gert

 

Vladimir Stoyanov
Telerik team
 answered on 04 Mar 2020
1 answer
274 views

Hello,

 

I have followed your WPF example: 

public class PlayerTypeConverter : TypeConverter
{
    public override bool GetStandardValuesSupported(ITypeDescriptorContext context)
    {
        return true;
    }
 
    public override bool GetStandardValuesExclusive(ITypeDescriptorContext context)
    {
        return true;
    }
 
    public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
    {
 
        return new StandardValuesCollection(new string[] { "Mark Wright", "Ian Rush", "John Barnes",
               "Paul Ince", "Jamie Redknapp", "Sami Hyypia", "Steven Gerrard ", "Jordan Henderson" });
    }
}

and attached the converter to my property:

/// <summary>
/// Sets the algorithm that is available for the mode.
/// </summary>
[Category("Reconstruction")]
// [Editor(typeof(AlgorithmEditor), typeof(UITypeEditor))]
[Telerik.Windows.Controls.Data.PropertyGrid.Editor(typeof(ComboBox))]
[TypeConverter(typeof(AlgorithmConverter))]
[Description("Sets the algorithm that is available for the mode.")]
public string Algorithm
{
    get => GetProperty<string>();
    set => SetProperty(value);
}

 

 

 

Unfortunately when setting the property to the PropertyGrid the combobox does not show up.

The type converter is not even used. Originally I had the PropertyInspector which is still active until I have transitioned to the RadPropertyGrid, here the TypeConverter is used without any problems.

What could be the problem?

 

Thanks

Martin

Yoan
Telerik team
 answered on 03 Mar 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?