Telerik Forums
UI for WPF Forum
1 answer
176 views

Hello,

I have problem with displaying group headers after when ever I change date in timeline view. There is xaml for schedule view:

<model:OrientedGroupHeaderContentTemplateSelector x:Key="GroupHeaderContentTemplateSelector">
            <model:OrientedGroupHeaderContentTemplateSelector.HorizontalResourceTemplate>
                <DataTemplate>
                    <Border Background="{Binding Name.Brush}" Width="250" Margin="1 0 1 0">
                        <StackPanel Margin="10 10 10 10" Orientation="Horizontal">
                            <TextBlock Foreground="{StaticResource GroupHeaderForeground}" FontSize="16" Margin="0" Text="{Binding Name.Name}" />
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </model:OrientedGroupHeaderContentTemplateSelector.HorizontalResourceTemplate>
            <model:OrientedGroupHeaderContentTemplateSelector.VerticalResourceTemplate>
                <DataTemplate>
                    <Border Background="{Binding Name.Brush}" Width="250" Margin="1 0 1 0">
                        <StackPanel Margin="10 10 10 10">
                            <TextBlock Foreground="{StaticResource GroupHeaderForeground}" FontSize="16" Margin="0" Text="{Binding Name.Name}" />
                        </StackPanel>
                    </Border>
                </DataTemplate>
            </model:OrientedGroupHeaderContentTemplateSelector.VerticalResourceTemplate>
        </model:OrientedGroupHeaderContentTemplateSelector>
 
<LinearGradientBrush x:Key="ReadOnlyBrush" MappingMode="Absolute" SpreadMethod="Repeat" StartPoint="0,0"
                EndPoint="1,1">
            <LinearGradientBrush.Transform>
                <ScaleTransform ScaleX="3" ScaleY="3" />
            </LinearGradientBrush.Transform>
            <GradientStop Offset="0.15" Color="#FF4040C2" />
            <GradientStop Offset="0.15" Color="White" />
        </LinearGradientBrush>
 
        <model:SpecialSlotStyleSelector x:Key="SpecialSlotStyleSelector">
            <model:SpecialSlotStyleSelector.NonWorkingHourStyle>
                <Style TargetType="telerik:HighlightItem">
                    <Setter Property="Canvas.ZIndex" Value="{Binding Slot.ZValueIndex}"/>
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate>
                                <Border Background="{StaticResource ReadOnlyBrush}" Opacity="0.7" />
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </model:SpecialSlotStyleSelector.NonWorkingHourStyle>
        </model:SpecialSlotStyleSelector>
<telerik:RadScheduleView  SpecialSlotsSource="{Binding SpecialSlots}"  GroupDescriptionsSource="{Binding GrpDescriptionCollection,UpdateSourceTrigger=PropertyChanged}" GroupHeaderContentTemplateSelector="{StaticResource GroupHeaderContentTemplateSelector}" ResourceTypesSource="{Binding ResourceTypesCollection, UpdateSourceTrigger=PropertyChanged}" AppointmentsSource="{Binding SeznamOperaciPlan, UpdateSourceTrigger=PropertyChanged}">                       
                        <telerik:RadScheduleView.ViewDefinitions>
                            <telerik:TimelineViewDefinition Orientation="Vertical" TimerulerGroupStringFormat="{}{0:dddd - dd.MM.yyyy}" VisibleDays="6" GroupTickLength="1d" MajorTickLength="1h" MinorTickLength="15min" TimerulerMajorTickStringFormat="{}{0:HH:mm}" TimerulerMinorTickStringFormat=":{0:mm}" StretchAppointments="True" StretchGroupHeaders="False" Title="Timeline"/>
                        </telerik:RadScheduleView.ViewDefinitions>
                    </telerik:RadScheduleView>

GroupDescriptionsSource and ResourceTypesSource are initialized and filled by some data in view model constructor.
On image grupheader-ok.jpg - is all OK and this what I want every when I change date, but if I go to the future date, it displays like on image groupheader-problem.jpg and If I go back to the actual week (current date) then it displays like on image groupheader-problem-back.jpg.

Where could be problem?

Thank you for your answers.

 

 

Dinko | Tech Support Engineer
Telerik team
 answered on 29 Nov 2018
3 answers
202 views

I'm trying to display high speed live network traffic data in RadGridView with sort/filter support. There will be about 5000 record per second, each record is about 500 bytes in average. And user need to see the latest records as soon as possible. 

I found that RadGrivView is unresponsive in this scenario, even after I followed the Tips and Tricks of RadGridView Performance. I had profiled the performance with VS, and the result as follows. And we can see RadGridView related operation cost too much time.

Is the any way to improve the performance?

 

I have uploaded my test project to TelerikGridViewPerf.zip

 

Thanks in advance!

 

Dilyan Traykov
Telerik team
 answered on 28 Nov 2018
2 answers
2.8K+ views

I'm getting this error in my code and I'm beyond frustrated

Could not load file or assembly 'Telerik.Windows.Controls, Culture=neutral' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)

 

It started with a problem in my project where it wasn't running the same version of the code that I had, no idea why but at some point the project stopped building.  If I tried to place a breakpoint it wouldn't reach it saying code doesn't match.  My first step was to delete the bin\debug folder and rebuild: nothing, folder remains empty.  Research, try to figure out why.  Finally go into my project and see that my main project doesn't have a check next to the build column.  I check that and build and get a ton of errors because now it can't find the RadGlyph.  I do more research and most of the comments are about cleaning and rebuilding but that doesn't work.

 

I decide to unreference all my telerik DLLs and add in only the ones I need and make sure they are all the same version.  I finally get it to build and now my bin folder is filled with files.  I try to run my program and get the above issue.  I've checked all the forums, I've done a clean and rebuild multiple times, I checked my cproj file, here are my telerik versions

 

<Reference Include="Telerik.Windows.Controls, Version=2018.3.911.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
    <Reference Include="Telerik.Windows.Controls.Data, Version=2018.3.911.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
    <Reference Include="Telerik.Windows.Controls.GridView, Version=2018.3.911.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
    <Reference Include="Telerik.Windows.Controls.Input, Version=2018.3.911.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
    <Reference Include="Telerik.Windows.Data, Version=2018.3.911.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" />
    <Reference Include="Telerik.Windows.Themes.Office2013, Version=2018.3.1016.45, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL">
      <HintPath>..\packages\Telerik.Windows.Themes.Office2013.for.Wpf.2018.3.1016\lib\net45\Telerik.Windows.Themes.Office2013.dll</HintPath>
    </Reference>

 

I even commented out the Office2013 theme, I figured the difference in version is because it's a theme but just in case I tried it with no luck. 

I'm at the end of my rope.  Any help would be appreciated.

Martin Ivanov
Telerik team
 answered on 28 Nov 2018
7 answers
79 views

Hello, 

I am new to Telerik  and i am trying my first tests in order to get a better understanding. I am not sure though if i have post in the right section in the forum.

I am dealing with a problem which is the following.

 

 I want to test a desktop application (WPF tests). So, when i set the exe file in the telerik test studio form the configure menu, every time i press record the application starts with the login screen of the application. Is there any way to bypass that.

 The problem is that i want to skip the login procedure and not execute that step every time and therefore start the recorder and test steps from a different point inside the application and execute from he selected point and onward each time. 

Thanks

Regards

Tom

 

 

Elena
Telerik team
 answered on 28 Nov 2018
10 answers
369 views
How do I hide the RadCarousel Border and Black Background?   I only want my DataTemplate below to show without the default border and background. The radcarousel keeps encompassing the DataTemplate inside of a Semi-Transparent border and black background.   I have set the border thickness to 0 and background to transparent and it will not go away. What do I do? 

I have the following Resource defined within a grid:
<Grid.Resources>
            <DataTemplate DataType="{x:Type local:Locations}" >
                <Border Padding="1" Height="166" Width="217" BorderThickness="1" HorizontalAlignment="Left" VerticalAlignment="Top" CornerRadius="2" RenderTransformOrigin="0.5,0.5" ClipToBounds="True">
                 <Border.RenderTransform>
                  <TransformGroup>
                   <ScaleTransform ScaleX="1"/>
                   <SkewTransform/>
                   <RotateTransform/>
                   <TranslateTransform/>
                  </TransformGroup>
                 </Border.RenderTransform>
                 <Border.Background>
                  <SolidColorBrush Opacity="0.435" Color="Transparent"/>
                 </Border.Background>
                    <Grid Background="Transparent" HorizontalAlignment="Left" VerticalAlignment="Top" Width="215" Height="160" Margin="0" Opacity="0.995" ClipToBounds="True">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="1" />   
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="1" />
                        </Grid.RowDefinitions>
      <!--    -->
      <Canvas Grid.Column="0" Grid.Row="0" Width="214.943" Height="161.468" RenderTransformOrigin="0.5,0.5" Margin="0,0,-213.943,-160.468">
        <Path Fill="#FFFFFFFF" Stretch="Fill" Width="214.943" Height="161.468" Opacity="0.14999400079250336"
        Data="F1M875.2334,354.4902C875.2334,356.6902,873.4334,358.4902,871.2334,358.4902L664.2904,358.4902C662.0894,358.4902,660.2904,356.6902,660.2904,354.4902L660.2904,201.0222C660.2904,198.8222,662.0894,197.0222,664.2904,197.0222L871.2334,197.0222C873.4334,197.0222,875.2334,198.8222,875.2334,201.0222z"/>
                    <Canvas  Width="203.781" Height="124.436" Canvas.Left="5.883" Canvas.Top="31.063">
                     <Path Fill="#FF000000" Stretch="Fill" Stroke="#FF4D4D4D" StrokeEndLineCap="Flat" StrokeLineJoin="Miter" StrokeMiterLimit="4" StrokeStartLineCap="Flat" StrokeThickness="1" Width="203.781" Height="124.436" Data="M869.4541,349.0215C869.4541,350.6715,868.1041,352.0215,866.4541,352.0215L669.6731,352.0215C668.0221,352.0215,666.6731,350.6715,666.6731,349.0215L666.6731,231.5855C666.6731,229.9365,668.0221,228.5855,669.6731,228.5855L866.4541,228.5855C868.1041,228.5855,869.4541,229.9365,869.4541,231.5855L869.4541,349.0215z"/>
                    </Canvas>
                    <TextBlock Width="200" Height="20" Canvas.Left="8" FontFamily="Myriad Pro" FontSize="17.333" Text="{Binding Path=LocationName}" TextWrapping="Wrap" Canvas.Top="-1"/>
                    <TextBlock Width="200" Height="15" Canvas.Left="8" FontFamily="Myriad Pro" FontSize="12" Text="{Binding Path=LocationFullAddress}" TextWrapping="Wrap" Canvas.Top="18"/>
                    <Image Canvas.Left="10" Canvas.Top="33" Source="{Binding Path=LocationImage}"  Width="198" Height="125.468"/>
                    
       </Canvas>
      <!--    -->
      
     </Grid>
                </Border>
            </DataTemplate>
        </Grid.Resources>

 <telerik:RadCarousel x:Name="LocationCarousel" AutoGenerateDataPresenters="false"
  HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"
        HorizontalAlignment="Stretch" VerticalAlignment="Stretch" 
  SelectionChanged="LocationCarousel_SelectionChanged" />
Dinko | Tech Support Engineer
Telerik team
 answered on 28 Nov 2018
1 answer
332 views

My goal is mark with frame some "linked" task. When user select one appointment, then linked appointmemts have to be marked with frame.

I have changed the OrientedAppointmentItemStyleSelector.HorizontalStyle - template of AppointmentItem.

<Border
    x:Name="CommonStatesVisual"
    BorderThickness="3, 3, 3, 3"
    CornerRadius="1"
    Visibility="{Binding Appointment.LinkedVisibility}">
    <Border.BorderBrush>
     ..................
    </Border.BorderBrush>
    <Border x:Name="CommonStatesVisualInnerBorder" BorderBrush="OrangeRed" BorderThickness="3" CornerRadius="1"/>
</Border>

 

So, my problem is refresh the view after changing Appointment.LinkedVisibility property, because only selected Appointment is change the drawing after updating.

P.S. this approach is not applicable for me https://www.telerik.com/forums/need-to-refresh-scheduleview

Can you help me to force redraw for all appointments?

Иван
Top achievements
Rank 1
 answered on 28 Nov 2018
2 answers
142 views

Hi,

I would like to scroll into view on a specific appointment having a start date not in the visible range.

My problem is that the range is correctly changed but the view is not scolled into this appointment.

I perform this action from a command where I reload the itemsource, then set the current date to the appointment start date and finally use : scheduler.ScrollIntoView(this.SelectedAppointment);

Do you have a suggestion on how to make this work?

Best Regards.

 

 

Иван
Top achievements
Rank 1
 answered on 28 Nov 2018
4 answers
583 views
Hi

I have a requirement from my users to be able to type into an autocompletebox and have it suggest results based on multiple values from my business object.

As an example, if the business object looks like this:
public class Client
{
    public string Name {get;set;}
    public string AccountCode {get;set;}
    public string Address {get;set;}
}

I want to be able to tell RadAutoCompleteBox to not only search on the Name field, but also the AccountCode when the user types into the box. The item data template I am showing the user is a stack panel containing both fields, so then they can start typing a value from either field to populate the suggestion box.

If I could provide the control with a search function to use instead of TextSearchPath, that would be ideal. A lamba like this would do the trick:

radacbox.SearchFunction += (client, search_text) => { client.Name.Contains(search_text) || client.AccountCode.Contains(search_text) };

Is there any way to override the default search behavior of the RadAutoCompleteBox?
Martin Ivanov
Telerik team
 answered on 27 Nov 2018
6 answers
128 views

Hi,

We are looking into upgrading our Telerik UI for WPF 2013Q1 to 2018Q3.

As part of the POC process I encountered the following blocking issue.

I need to upgrade this code to Telerik UI for WPF 2018 Q3 but wasn't able to do so after consulting the documentation available on the web.

The main issue is converting the removed\obsolete GridViewElementExportingEventArgs.Attributes["border"] and GridViewElementExportingEventArgs.Styles["background-color"] from 2013Q1 to 2018Q3.

 

Can you help me solve this upgrade blocking issue?

 

Thanks in advance

01.private static RadDocument CreateDocument(RadGridView grid, PrintSettings settings)
02.        {
03.            RadDocument document = null;
04. 
05.            using (var stream = new MemoryStream())
06.            {
07.                EventHandler<GridViewElementExportingEventArgs> elementExporting = (s, e) =>
08.                {
09.                    if (e.Element == ExportElement.Table)
10.                    {
11.                        e.Attributes["border"] = "0";
12.                    }
13.                    else if (e.Element == ExportElement.HeaderRow)
14.                    {
15.                        if (settings.HeaderBackground != null)
16.                        {
17.                            e.VisualParameters
18.                            e.Styles.Add("background-color", settings.HeaderBackground.ToString().Remove(1, 2));
19.                        }
20.                    }
21.                    else if (e.Element == ExportElement.GroupHeaderRow)
22.                    {
23.                        if (settings.GroupHeaderBackground != null)
24.                        {
25.                            e.Styles.Add("background-color", settings.GroupHeaderBackground.ToString().Remove(1, 2));
26.                        }
27.                    }
28.                    else if (e.Element == ExportElement.Row)
29.                    {
30.                        if (settings.RowBackground != null)
31.                        {
32.                            e.Styles.Add("background-color", settings.RowBackground.ToString().Remove(1, 2));
33.                        }
34.                    }
35.                };
36. 
37.                grid.ElementExporting += elementExporting;
38. 
39.                grid.Export(stream, new GridViewExportOptions()
40.                {
41.                    Format = Telerik.Windows.Controls.ExportFormat.Html,
42.                    ShowColumnFooters = grid.ShowColumnFooters,
43.                    ShowColumnHeaders = grid.ShowColumnHeaders,
44.                    ShowGroupFooters = grid.ShowGroupFooters
45.                });
46. 
47.                grid.ElementExporting -= elementExporting;
48. 
49.                stream.Position = 0;
50. 
51.                document = new HtmlFormatProvider().Import(stream);
52.            }
53. 
54.            return document;
55.        }
Nir
Top achievements
Rank 1
 answered on 27 Nov 2018
1 answer
143 views

I have a crash I cannot reproduce in a test program. I'm allowing the user to change the number of maps on the screen from 1 to 4. When switching from 4 maps to 1 map (for example), I remove the DataContext for the maps that will be hidden. I do this because I will still be updating the ViewModel for every map and do not want the map to reflect these changes if it's not visible. This causes an instant crash for maps 3 and 4. Here is the applicable stack trace:

   at Telerik.Windows.Controls.Map.TilesVisualizationLayer.CalculateViewports()
   at Telerik.Windows.Controls.Map.TilesVisualizationLayer.MultiscaleImage_MotionFinished(Object sender, RoutedEventArgs e)
   at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
   at Telerik.Windows.Controls.Map.MultiScaleImage.<RaiseMotionFinishedEvent>b__2()

It appears to crash because there is no longer a provider. Whether the map is visible or not makes no difference. Any ideas?

Jason D
Top achievements
Rank 1
Veteran
 answered on 26 Nov 2018
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?