Telerik Forums
UI for WPF Forum
2 answers
271 views

Hello.

In radgridview i change the colors of the cells in the cellloaded event, which wotks fine, but

is there any way to use doubleanimate the backgroudn color of a cell?

 

This is how i color now:

 

Private Sub dgw_PL_CellLoaded(sender As Object, e As CellEventArgs) Handles dgw_PL.CellLoaded
        If TypeOf e.Cell Is GridViewHeaderCell Or TypeOf e.Cell Is GridViewFooterCell Then
            Exit Sub
        End If
        If e.Cell.Column.DisplayIndex < 7 Then
            e.Cell.Background = Brushes.LightSteelBlue
        End If
        Dim G As Telerik.Windows.Controls.GridView.GridViewCell = e.Cell
        If e.Cell.Column.UniqueName.ToString.ToUpper.Contains("DEM") Then
            If e.Cell.Column.DisplayIndex > 6 AndAlso (G.Content.text = "0" Or G.Value > 0) Then
                G.Background = New SolidColorBrush(Color.FromRgb(200, 255, 215))
            End If
        End If
End Sub

 

How could i make it for example blink between two colors, with doubleanimation?

 

Thanks

Peter

Peter
Top achievements
Rank 1
Iron
Iron
 answered on 06 Feb 2022
7 answers
566 views
Hi,
AutoComplete with Filtering doesn't seem to be working!
Is this a known issue?

thanks,
Steve

<

 

 

telerik:RadComboBox IsEditable="True" IsFilteringEnabled="True" >

 

 

 

 

<telerik:RadComboBoxItem Content="a1" /><telerik:RadComboBoxItem Content="abc" /><telerik:RadComboBoxItem ntent="b1" />

 

 

 

 

<telerik:RadComboBoxItem Content="b2" />

 

 

 

 

</telerik:RadComboBox>

 

Ron
Top achievements
Rank 1
Iron
 updated answer on 05 Feb 2022
0 answers
126 views

Hi,

I'm using SeriesDescriptorSelector + SeriesDesciptor i order to create series.

Based on the viewmodel info. the axis series are also created on when the series are  created, on CreateInstanceCore method.

Evething works fin except the axis TitleTemplate.

 

protected override ChartSeries CreateInstanceCore(object context)
        {
            IChartSerieViewModel viewModel = context as IChartSerieViewModel;
            var result = base.CreateInstanceCore(context);
            viewModel.ChartSeries = result;

            var scl = (viewModel.ChartSeries as ScatterLineSeries);

            scl.HorizontalAxis = new LinearAxis();
            scl.HorizontalAxis.DataContext = viewModel.SerieSettings.HorizontalAxis;
            viewModel.SerieSettings.HorizontalAxis.Bind(scl.HorizontalAxis);

            scl.VerticalAxis = new LinearAxis();
            scl.VerticalAxis.DataContext = viewModel.SerieSettings.VerticalAxis;

            return result;
        }

 

 

here is the Bind method

 

 public void Bind(CartesianAxis axis)
        {
            if (axis == null)
                return;

            SetLabelIntervalAxisBinding(axis, nameof(LabelInterval), this);
            SetLabelFormatAxisBinding(axis, nameof(LabelFormat), this);
            SetTitleAxisBinding(axis, nameof(Title), this);
            SetVisbilityBinding(axis, nameof(IsVisible), this);
            if (axis is LinearAxis)
            {
                SetMaxAxisBinding(axis as LinearAxis, nameof(Maximum), this);
                SetMinAxisBinding(axis as LinearAxis, nameof(Minimum), this);
            }
            if (axis is CategoricalAxis)
            {
                (axis as CategoricalAxis).PlotMode = Telerik.Charting.AxisPlotMode.OnTicksPadded;
                (axis as CategoricalAxis).MajorTickInterval = 1;
            }
            SetColorAxisBinding(axis, nameof(AxisColor), this);

            var rers = axis.FindResource("AxisTemplateTitle");

            axis.TitleTemplate = Application.Current.Resources["AxisTemplateTitle"] as DataTemplate;
        }

 

like I said, the binding works fine,, but even if the TitleTemplate is set, the chart won't display the title.

 

Any info is highly appreciated.

 

Thank you

Cosmin
Top achievements
Rank 1
 asked on 04 Feb 2022
1 answer
185 views

I have used the provided CategoryViewModel to implement RadTreeView tristate logic with checkboxes and also Enable/disable of some items by using isChecked and isEnabled properties.

Now  i need to implement Expand and Collapse when i check a parent item (subcategory item )

Could you pls suggest which events and how to use.

jyostna
Top achievements
Rank 1
Iron
 answered on 04 Feb 2022
1 answer
150 views

Hi,

I'm trying to use the ScheduleView control to create a kind of calender for shift planning. (a bit like the Shifts app in Teams)
But I'm having some troubles styling it in the way I want.

Based on the documentation, I have this at the moment.


<telerik:RadScheduleView x:Name="ScheduleView" AppointmentsSource="{Binding Appointments}">
	<telerik:RadScheduleView.ViewDefinitions>
		<!--<telerik:DayViewDefinition/>-->
		<telerik:WeekViewDefinition Orientation="Vertical" ShowWeekGroupHeaders="True" ShowAllDayArea="False" ShowTimeRuler="True" MinorTickLength="1d" MajorTickLength="1d" WeekGroupHeaderStringFormat="Week number {0}, {1:D}" FirstDayOfWeek="Monday"/>
	</telerik:RadScheduleView.ViewDefinitions>
	<telerik:RadScheduleView.ResourceTypesSource>
		<telerik:ResourceTypeCollection>
			<telerik:ResourceType Name="Team">
				<telerik:Resource ResourceName="DAG" DisplayName="Dag"/>
				<telerik:Resource ResourceName="PL1" DisplayName="Ploeg 1"/>
				<telerik:Resource ResourceName="PL2" DisplayName="Ploeg 2"/>
				<telerik:Resource ResourceName="NA" DisplayName="Nacht"/>
				<telerik:Resource ResourceName="WK1" DisplayName="Weekend 1"/>
				<telerik:Resource ResourceName="WK2" DisplayName="Weekend 2"/>
			</telerik:ResourceType>
		</telerik:ResourceTypeCollection>
	</telerik:RadScheduleView.ResourceTypesSource>
	<telerik:RadScheduleView.GroupDescriptionsSource>
		<telerik:GroupDescriptionCollection>
			<telerik:DateGroupDescription/>
			<telerik:ResourceGroupDescription ResourceType="Team"/>
		</telerik:GroupDescriptionCollection>
	</telerik:RadScheduleView.GroupDescriptionsSource>
</telerik:RadScheduleView>

This is already pretty close to what I need. But I want my Team resource to be displayed horizontally.
The goal is that per day, I can fill in if for that team it's a working day or a not. So 1 entry per day per team. (I don't care about the shift timing yet since it's fixed per shift anyway)

Something like this

Is this possible? And could somebody help me guide me in the right direction please? :-)

Dilyan Traykov
Telerik team
 answered on 04 Feb 2022
1 answer
112 views

Hello, 

We are needing to retrieve all map tiles for both Bing and Open Street over https instead of http. Using this forum post we were able to successfully retrieve Open Street tiles over https.

https://www.telerik.com/forums/openstreetmapprovider-through-https#1146262

However after structuring the Bing requests similarly, it appears the initialization of the Bing map service will only go out over http. With only https allowed through the firewall, this call fails and the tiles are never retrieved. If we open http, then the initialization is successful, and the map tiles will come through over https. 

This is an example of the Bing endpoint that is only requested over http while launching the map. 

Is there a way to override the initialization or imagery setup with Bing, to have all the mapping calls use https, similar to the GetTile override? 

Example Code In Use:

namespace Map.RadMap
{
    public class CustomHttpsMapProvider : TiledProvider
    {
        public CustomHttpsMapProvider(MapMode mapMode = MapMode.Road, bool hasLabels = false, string applicationId = Strings.BING_MAPS_KEY, string osmUserAgent = null)
              : base()
        {
            // Open Street
            if (osmUserAgent != null)
            {
                OsmTileMapSource source = new HttpsOpenStreetMapSource();
                source.WebHeaders.Add(HttpRequestHeader.UserAgent, osmUserAgent);
                this.MapSources.Add(source.UniqueId, source);
                return;
            }

            // Bing Hybrid, Aerial or Road
            switch (mapMode)
            {
                case MapMode.Aerial:
                    {
                        if (hasLabels)
                        {
                            BingRestAerialLabelSource source = new HttpsBingAerialLabelSource(applicationId);
                            MapSources.Add(source.UniqueId, source);
                        }
                        else
                        {
                            BingRestAerialSource source = new HttpsBingAerialSource(applicationId);
                            MapSources.Add(source.UniqueId, source);
                        }
                        break;
                    }

                case MapMode.Road:
                    {
                        BingRestRoadSource source = new HttpsBingRoadSource(applicationId);
                        MapSources.Add(source.UniqueId, source);
                        break;
                    }
            }
        }

        public override ISpatialReference SpatialReference
        {
            get
            {
                return new MercatorProjection();
            }
        }
    }

    public class HttpsBingAerialSource : BingRestAerialSource
    {
        public HttpsBingAerialSource(string applicationId) : base(applicationId)
        {
        }

        protected override Uri GetTile(int tileLevel, int tilePositionX, int tilePositionY)
        {
            Uri baseURI = base.GetTile(tileLevel, tilePositionX, tilePositionY);
            string uriString = baseURI.AbsoluteUri.Replace("http", "https");
            return new Uri(uriString);
        }
    }

    public class HttpsBingAerialLabelSource : BingRestAerialLabelSource
    {
        public HttpsBingAerialLabelSource(string applicationId) : base(applicationId)
        {
        }

        protected override Uri GetTile(int tileLevel, int tilePositionX, int tilePositionY)
        {
            Uri baseURI = base.GetTile(tileLevel, tilePositionX, tilePositionY);
            string uriString = baseURI.AbsoluteUri.Replace("http", "https");
            return new Uri(uriString);
        }
    }

    public class HttpsBingRoadSource : BingRestRoadSource
    {
        public HttpsBingRoadSource(string applicationId) : base(applicationId)
        {
        }

        protected override Uri GetTile(int tileLevel, int tilePositionX, int tilePositionY)
        {
            Uri baseURI = base.GetTile(tileLevel, tilePositionX, tilePositionY);
            string uriString = baseURI.AbsoluteUri.Replace("http", "https");
            return new Uri(uriString);
        }
    }

    public class HttpsOpenStreetMapSource : OsmTileMapSource
    {
        public HttpsOpenStreetMapSource() : base(@"https://{prefix}.tile.openstreetmap.org/{zoom}/{x}/{y}.png")
        {
        }

        protected override Uri GetTile(int tileLevel, int tilePositionX, int tilePositionY)
        {
            Uri baseURI = base.GetTile(tileLevel, tilePositionX, tilePositionY);
            string uriString = baseURI.AbsoluteUri.Replace("http", "https");
            return new Uri(uriString);
        }
    }
}

Stenly
Telerik team
 answered on 03 Feb 2022
1 answer
132 views

In a RadCartesianChart, zero values and very small values (relative to the Maximum of the axis) don't show up.  I would like to have them show up as a horizontal line, like in the attached picture.

I got that picture by setting a small value for y.  But if you increase the height the chart, it starts to look like the bar has some height rather than just being a horizontal line.

Is there a better way to get zeros to show up?

 

 

Martin Ivanov
Telerik team
 answered on 03 Feb 2022
0 answers
165 views

Hello! Could you please help me to fix the following issue when I call _radCombobox.ToggleDropDown():


The control was found, was expanded and then this exception was thrown:


Message: 
    System.TimeoutException : Wait for condition has timed out
  Stack Trace: 
    Server stack trace: 
    WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target)
    WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType)
    WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
    VisualWait.ForVisible(Int32 timeout)
    VisualWait.ForNoMotion(Int32 initialWait, Int32 motionCheckInterval, Int32 timeout)
    RadComboBox.WaitDropDownAnimation(Int32 millis)
    RadComboBox.ToggleDropDown()

Here is the combobox (as a part of UserControl):


<telerik:RadComboBox  x:Name="CmbAddressType" Grid.Row="1" Grid.Column="3" Grid.ColumnSpan="3">
          <TextBlock>LG Nexus 5X</TextBlock>
          <TextBlock>Huawai Nexus 6P</TextBlock>
          <TextBlock>iPhone 6S</TextBlock>
          <TextBlock>iPhone 6S Plus</TextBlock>
          <TextBlock>Microsoft Lumia 950</TextBlock>
        </telerik:RadComboBox>

Application: WPF

Testing Framework: Progress Telerik Test Studio 2021.3(213.11.3.0)

 


Vitaly
Top achievements
Rank 1
 updated question on 03 Feb 2022
1 answer
215 views

   I'm attempting to following the instructions at https://docs.telerik.com/devtools/wpf/controls/radrichtextbox/mef to improve the loading time of the RadRichTextBox control.  However the given example is in c#.  I've tried to convert that over to vb.net but I can't seem to find the right assemblies.  

For example:

RadCompositionInitializer.Catalog = new TypeCatalog( // format providers typeof(XamlFormatProvider), typeof(RtfFormatProvider), typeof(DocxFormatProvider));

trying:

Imports Telerik
Imports Telerik.Windows.Documents.UI.Extensibility

 

Dim oTest as RadCompositionInitializer.Catalog = new TypeCatalog( typeof(XamlFormatProvider), typeof(RtfFormatProvider), typeof(DocxFormatProvider))

 

RadCompositionInitializer seems to come from Telerik.Windows.Documents.UI.Extensibility, but RadCompsitionInitializer.Catalog is unknown and TypeCatalog is unknown. Anyone have success in implementing this in vb.net? Many thanks!

Tanya
Telerik team
 answered on 03 Feb 2022
1 answer
358 views

I have a linear chart that contains data from 1/4/2019 to 31/3/2020. However, the last tick is not displayed? How to always display the last tick with the corresponding label. Thanks

 

 


<telerik:RadCartesianChart
        HorizontalZoomRangeStart="0.0" HorizontalZoomRangeEnd="1.0" RenderTransformOrigin="0.5,0.5">

        <telerik:RadCartesianChart.Resources>

            <Style BasedOn="{StaticResource LineSeriesStyle}" TargetType="{x:Type telerik:LineSeries}">
                <Setter Property="CategoryBinding" Value="X" />
                <Setter Property="ValueBinding" Value="Y" />
                <Setter Property="StrokeThickness" Value="2" />
                <Setter Property="Stroke" Value="#0083A9" /> <!-- Aon blue. See: https://brandmatters.aon.com/bms/damui/index.cfm?category=1450&assetID=4993 -->
            </Style>

        </telerik:RadCartesianChart.Resources>

        <telerik:RadCartesianChart.HorizontalAxis>
            <telerik:DateTimeContinuousAxis LabelFormat="{Binding HorizontalAxisFormatString}" 
                                            SmartLabelsMode="SmartStep" />
        </telerik:RadCartesianChart.HorizontalAxis>

        <telerik:RadCartesianChart.VerticalAxis>
            <telerik:LinearAxis
                LabelFormat="{Binding VerticalAxisFormatString}"
                RangeExtendDirection="None"
                SmartLabelsMode="SmartStep" />
        </telerik:RadCartesianChart.VerticalAxis>

        <telerik:RadCartesianChart.SeriesProvider>
            <telerik:ChartSeriesProvider Source="{Binding ItemsSource}">
                <telerik:ChartSeriesProvider.SeriesDescriptors>
                    <telerik:ChartSeriesDescriptor ItemsSourcePath="Points" TypePath="SeriesType" />
                </telerik:ChartSeriesProvider.SeriesDescriptors>
            </telerik:ChartSeriesProvider>
        </telerik:RadCartesianChart.SeriesProvider>

        <telerik:RadCartesianChart.Grid>
            <telerik:CartesianChartGrid MajorLinesVisibility="XY" />
        </telerik:RadCartesianChart.Grid>

    </telerik:RadCartesianChart>

Stenly
Telerik team
 answered on 01 Feb 2022
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
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?