Telerik Forums
UI for WPF Forum
1 answer
87 views
Hello,

Can i change the RadWaterMarkTextBox, used by the AutoCompleteBox, by an other TextBox with ControlTemplate?

Does someone have an example?
Kalin
Telerik team
 answered on 08 Jan 2015
5 answers
741 views
I am trying to set a gridview filterdescriptor in xaml. 

The filterdescriptor looks like this: 

<telerik:RadGridView.FilterDescriptors>
    <telerik:FilterDescriptor Member="Customer.Name" Value="{Binding Name, ElementName=gvWorkOrders.SelectedItem}"/>
</telerik:RadGridView.FilterDescriptors>

The idea is that gridview A automatically filters according to what is selected in gridview B. 

The full error is as follows:

System.Windows.Data Error: 2 : Cannot find governing FrameworkElement or FrameworkContentElement for target element. BindingExpression:Path=Name; DataItem=null; target element is 'FilterDescriptor' (HashCode=61845703); target property is 'Value' (type 'Object')


Any ideas? I'm happy to post more code, just let me know what other information would help.
Dimitrina
Telerik team
 answered on 08 Jan 2015
1 answer
81 views
My company has bought Telerik UI for WPF to migrate an old application targeting Surface Pro 3 tablets. This old app makes use of the Surface SDK package a- and also of Blake.

My question is: do we need to still have a dependency on these 2 dll or can we drop them ?

Regards
Philippe
Petya
Telerik team
 answered on 07 Jan 2015
1 answer
121 views
Hi there,

My client has bought "Telerik WPF for UI" in order to build an application targeting  "Surface Pro 3" tablets with Windows 7. We are currently migrating an old app which doesn't make use of Telerik WPF and, in order to address the Surface tablet, has dependencies with the Surface SDK 2.0.msi - and also with the Blake.

So I wonder if we can drop the SurfaceSDK.msi and has the same features with your product ?

Regards
Philippe
Petya
Telerik team
 answered on 07 Jan 2015
3 answers
600 views
Hello, does the RichTextBox have a method that will prevent the UI updating while I change the text in code? At times, some of the updates I make don't show up in the UI, and I'm thinking it's a timing or refresh issue. I'm editing the existing text. Sometimes the font won't change, sometimes the alignment won't change etc. My code looks something  like this:

radRichText.ChangeTextAlignment(Telerik.Windows.Documents.Layout.RadTextAlignment.Center);
radRichText.ToggleItalic();
radRichText.ChangeTextForeColor((Color)ViewModel.TextColor);
radRichText.Background = new SolidColorBrush((Color)ViewModel.TextBackColor);           
FontFamily fontFamily = new System.Windows.Media.FontFamily(ViewModel.Font);
 radRichTextBoxCells.ChangeFontFamily(fontFamily);


Thanks,
Scott
Petya
Telerik team
 answered on 07 Jan 2015
3 answers
247 views
Greetings,

I have a project using Telerik and Caliburn.Micro.  Up to this point everything has been smooth, clean, light and flawless.  However, I've hit a roadblock and now need serious help.  I need to use custom controls within the DocumentHost portion of the RadDocking framework.  Below is XAML declarations that identifies a declaration that does work, and one that does not work using the same control.

Does NOT work:
<telerik:RadDocking.DocumentHost>
    <telerik:RadSplitContainer>
        <telerik:RadPaneGroup>
            <telerik:RadDocumentPane Title="Document" x:Name="uxRadDocumentPane">
                <telerik:RadDocumentPane.Content>
                    <StackPanel Background="Bisque">
                        <ContentControl x:Name="ImageControlImageViewModel"/>
                    </StackPanel>
                </telerik:RadDocumentPane.Content>
            </telerik:RadDocumentPane>
        </telerik:RadPaneGroup>
    </telerik:RadSplitContainer>
</telerik:RadDocking.DocumentHost>


Does work:
<telerik:RadSplitContainer>
    <telerik:RadPaneGroup>
        <telerik:RadDocumentPane Title="Document">
            <telerik:RadDocumentPane.Content>
                <StackPanel Background="Bisque">
                    <ContentControl x:Name="ImageControlImageViewModel2"/>
                </StackPanel>
            </telerik:RadDocumentPane.Content>
        </telerik:RadDocumentPane>
    </telerik:RadPaneGroup>
</telerik:RadSplitContainer>


As you can see, the declarations are nearly identical.  The user control is identical, only has a different reference name.  This work only when I remove the DocumentHost container.  How can I get this to work and still keep the implementation lean, mean and clean?

Thank you,

Will
Kalin
Telerik team
 answered on 07 Jan 2015
2 answers
95 views
When click on the cell which has value  getting following error
Not enough call stack information available to narrow down the issue

Does anyone encountered the same behavior?

Error details:


Object reference not set to an instance of an object.

   at Telerik.Windows.Controls.GridView.GridViewCell.Editor_Loaded(Object sender, RoutedEventArgs e) in c:\TB\221\WPF_Scrum\Current_HotFix\Sources\Controls\GridView\GridView\GridView\Cells\GridViewCell.cs:line 888
   at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
   at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
   at MS.Internal.FrameworkObject.OnLoaded(RoutedEventArgs args)
   at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
   at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
   at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
   at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
   at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
Dimitrina
Telerik team
 answered on 07 Jan 2015
1 answer
59 views
How does i go about making custom drawing tool, had no luck finding any resources on this area.

I am trying to make a LineTool.

Currently i am Initializing the tool like this. Which i am aware might be incorrect but using "LineTool" results in no geometry being shown.

DrawingService.InitializeDraw(shape, "PencilTool"); //LineTool does not show anything


Also i need the ManipulationAdorner changed but only when a single LineShape is selected. I would like two resize handles at the end of the line. The diagram will contain other shapes that still will show four resize handles. Is it possible to make different styles for the ManipulationAdorner dependent on what the current selection is.


public override bool MouseDown(PointerArgs e)
        {
            if (!IsActive)
                return false;

            DrawingService.StartDraw();
            DrawingService.DrawPoints(e.TransformedPoint, e.TransformedPoint);

            return base.MouseDown(e);
        }

        public override bool MouseMove(PointerArgs e)
        {
            if (!IsActive || !ToolService.IsMouseDown || (ToolService.IsControlDown || !DrawingService.IsDrawing))
                return false;
            
            if (DrawingService.ActiveShape == null)
            {
                var shape = CreateShape();
                shape.IsSelected = true;
                shape.Geometry = new LineGeometry(e.TransformedPoint, e.TransformedPoint);

                DrawingService.InitializeDraw(shape, "PencilTool"); //LineTool does not show anything
                //SelectionService.ClearSelection();
                
                return base.MouseMove(e);
            }


            if (DrawingService.AnchorPoints.Count() > 1)
                DrawingService.RemoveLastAnchorPoint();
                
            DrawingService.DrawPoints(e.TransformedPoint, e.TransformedPoint);
            return true;
        }

        public override bool MouseUp(PointerArgs e)
        {
            if (!IsActive || !DrawingService.IsDrawing)
                return base.MouseUp(e);
            CompleteTool();
            _diagram.ActiveTool = MouseTool.PointerTool;
            return true;
        }
Anders Lind
Top achievements
Rank 1
 answered on 07 Jan 2015
2 answers
382 views
There are data for whole year with 1 minute time step. It's 525,600 points. 
I'm trying to use DateTimeContinuousAxis, but its properties behavior is really strange.

I need ticks for first minute of each day. But setting MajorStep="1" MajorStepUnit="Day" results in attached image. (It results in 1 tick per 2 hours for some reason)
Is there way to get one tick for day?

Note, that I also use Pan/Zoom feature.

Thanks,
Michael



MainWindow.xaml.cs

public partial class MainWindow : Window
{
    public MainWindow()
    {
        InitializeComponent();

        DataContext = this;
        var c = 365*24*60;
        var data = new List<Step>(c);
        var random = new Random();
        for (var minute = 0; minute < c; minute++)
        {

            var date = new DateTime(2006, 1, 1) + TimeSpan.FromMinutes(minute);
            var value = random.Next(1800, 2000);
            data.Add(new Step {Value = value, Date = date});
        }
        Data = data;
    }

    public static readonly DependencyProperty DataProperty = DependencyProperty.Register("Data",
        typeof (IEnumerable<Step>), typeof (MainWindow), new PropertyMetadata(null));

    public IEnumerable<Step> Data
    {
        get { return (IEnumerable<Step>) GetValue(DataProperty); }
        set { SetValue(DataProperty, value); }
    }
}

public class Step
{
    public Double Value { get; set; }
    public DateTime Date { get; set; }
}



MainWindow.xaml

<Window x:Class="telerik_chart_big_data.MainWindow"
        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"
        Title="MainWindow" Height="350" Width="525">
    <Grid>
        <telerik:RadCartesianChart x:Name="Chart" Zoom="12.1,1" PanOffset="0,0" MaxZoom="365,1">
            <telerik:RadCartesianChart.Behaviors>
                <telerik:ChartPanAndZoomBehavior ZoomMode="Horizontal"/>
            </telerik:RadCartesianChart.Behaviors>
           
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:DateTimeContinuousAxis Title="X" LabelFitMode="MultiLine" PlotMode="OnTicks" MajorStep="1" MajorStepUnit="Day"/>
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis Title="Y"/>
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:LineSeries ItemsSource="{Binding Data}" RenderMode="Light" ValueBinding="Value" CategoryBinding="Date" Stroke="Red"/>            
        </telerik:RadCartesianChart>
    </Grid>
</Window>











Petar Marchev
Telerik team
 answered on 07 Jan 2015
7 answers
383 views
Below are the Details for Docking Pin/Unpin issue.

Control Name -  DockingDlls
Version - 2014.1.331.45
Issue – Unable to minimize all Rad Panes in RadPaneGroup (Move all related panes in to vertical bar), when Unpin any one RadPane in RadPaneGroup.

Implementation -  RadpaneGroup placed inside RadSplitContainer then RadSplitContainer placed inside RadDocking control.

Added following Pin and Unpin event handlers.   

private void RadDocking_OnPin(object sender, StateChangeEventArgs e)
        {
            foreach (var moduleItem in e.Panes)
            {
                var radPaneItem = moduleItem;                if (radPaneItem != null)
                {
                    if (radPaneItem.PaneGroup.Name == "NavigationPanesGroup")
                    {
                        NavigationPanesGroup.PinAllPanes();
                    }                    if (radPaneItem.PaneGroup.Name == "QuickAccessPanesGroup")
                    {
                        QuickAccessPanesGroup.PinAllPanes();
                    }
                }
            }
        }        private void RadDocking_OnUnpin(object sender, StateChangeEventArgs e)
        {
            foreach (var moduleItem in e.Panes)
            {
                var radPaneItem = moduleItem;                if (radPaneItem != null)
                {
                    if (radPaneItem.PaneGroup.Name == "NavigationPanesGroup")
                    {
                        NavigationPanesGroup.UnpinAllPanes();
                    }                    if (radPaneItem.PaneGroup.Name == "QuickAccessPanesGroup")
                    {
                        QuickAccessPanesGroup.UnpinAllPanes();
                    }
                }
            }
        }
Above code works good for Pin/Unpin functionality, But all panes in RadPanesGrup not moving to VerticalBar. Only Unpinned RadPane item is moving to verticalBar.

Please give pointers/suggestions to unpin and minimize all Radpanes, when we Unpin any RadPane.

I have attached sample project in this post.
Vladi
Telerik team
 answered on 07 Jan 2015
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
Book
FileDialogs
ToolBar
ColorPicker
TimePicker
SyntaxEditor
MultiColumnComboBox
VirtualGrid
Wizard
ExpressionEditor
NavigationView (Hamburger Menu)
DesktopAlert
WatermarkTextBox
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
VirtualKeyboard
HighlightTextBlock
Security
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?