Telerik Forums
UI for WPF Forum
2 answers
256 views
I have been looking at the WPF Controls example for RadBusyIndicator in the "Demos - RadControls for WPF Q3 2012" application, and I cannot figure out how to have my own application display the left/right scrolling dots instead of the normal rotating yellow circle that I am appearing to get by default. For right now, I can set the BusyContext to whatever text I want and turn the IsBusy on and off in my C# code, and that is all working fine. The IsIndeterminate flag is set to True in my XAML.

From the controls example app, there are only 3 files shown for the configurator example, and I can't see how the busy indicator is being changed. Is there something that I am missing, or is there some C# or XAML not being shown in the controls example app that is modifying the indicator?
Brian
Top achievements
Rank 1
 answered on 30 Oct 2012
1 answer
132 views
Hi,

I have following code, which should hide unknown elements when deserializing layout xml
private void dockManager_ElementLoaded(object sender, LayoutSerializationEventArgs e)
 {
   if (e.AffectedElement is RadPane)
   {
     RadPane paneView = e.AffectedElement as RadPane;
 
 
     ILayoutPane paneVM = viewModel.LayoutPanes
       .OfType<ILayoutPane>()
       .FirstOrDefault(vm => vm.Id == e.AffectedElementSerializationTag);
 
     if (paneVM == null)
     {
       paneView.IsHidden = true;
     }
   }
 }


Althought   paneView.IsHidden = true   is called, the pane is still visible after the LoadLayout.
I tried to set title of the paneView.Title as well. Title was not displayed.

Layout file look like this:

<RadDocking>
  <DocumentHost>
    <RadSplitContainer>
      <Items>
        <RadPaneGroup SelectedIndex="0">
          <Items>
            <RadPane IsHidden="False" IsDockable="True" />
          </Items>
        </RadPaneGroup>
      </Items>
    </RadSplitContainer>
  </DocumentHost>
</RadDocking>



And another question, or request:
How can I prevent element from being serialized or deserialized? ElementLoading and ElementSaving should have  cancelable EventArgs.

private void dockManager_ElementLoading(object sender, LayoutSerializationLoadingEventArgs e)
{
  if (e.AffectedElementSerializationTag == null) e.Cancel = true;
}


 
Thanks
Vladi
Telerik team
 answered on 30 Oct 2012
1 answer
160 views
hi,

i've recently decided to chose one of 3rd party components to use in my wpf applications...when i came to this site i saw this image,i loved it's design...but in trial i couldn't find controls or samples about how can i do something like that...can any one help me in a little guide about how can i achieve a design like that? (Specially the parts i've pointed on...what kind of control are they)
Harald Bacik
Top achievements
Rank 2
 answered on 30 Oct 2012
1 answer
268 views
Hi
I'm doing a RadCartesianChart with a ScatterLineSeries. When the y-values are negative, the chart always extends the vertical axis all the way from 0, even if the y-values are nowhere near 0. Say, for instance, if the y-values only vary between -10 and -11: The graph displays the area between 0 and -12 so that there is a large empty area above the line and my graph comes out quite flat. Losing a lot of the information that could have been expressed. I attach an example in a jpg.

The behaviour I would like, and that I think would make sense, is that the y-axis extends just around the values in my dataset. This is what happens for positive y-values, I can't see why there is it's different for negative values.

I have tried using RangeExtendDirection="None" and Minimum="{x:Static System:Double.NegativeInfinity}" Maximum="{x:Static System:Double.PositiveInfinity}" on the telerik:LinearAxis elements, neither make any difference.

Is there any way to fix this? I attach a simplified version of my graph xaml below. 

Thanks
A.M



        <telerik:RadCartesianChart Name="LineChart">
            <telerik:RadCartesianChart.HorizontalAxis>
                <telerik:LinearAxis />
            </telerik:RadCartesianChart.HorizontalAxis>
            <telerik:RadCartesianChart.VerticalAxis>
                <telerik:LinearAxis />
            </telerik:RadCartesianChart.VerticalAxis>
            <telerik:RadCartesianChart.Series>
                <telerik:ScatterLineSeries Name="Series" ItemsSource ="{Binding}"/>
            </telerik:RadCartesianChart.Series>
        </telerik:RadCartesianChart>
Petar Marchev
Telerik team
 answered on 30 Oct 2012
3 answers
196 views
My customer has handed me some new requirements that makes me wonder whether Telerik's ChartView can deliver upon.
For sake of simplicity I attached an illustration and marked the three features that's being requested:

A: Is it possible to add areas like in the illustration. I would need to be able to add one such area per series.
B: The area might have to change its size at some point along the X-axis and it would be great if I could highlight and textually present those points somehow
C: The series would need to be drawn differently outside the marked min/max areas. Is this possible?

I've looked at PointTemplateSelectors for feature C but I don't understand how to move on with that. How would I get to the selected color for example?

Thank you
Petar Marchev
Telerik team
 answered on 30 Oct 2012
1 answer
721 views
Hi,

I converted string to RadDocument manually.

How can i get back my string back from raddocument.

I am using value converters to do this.

here is the sample code. please help me and thanks in advance

raddocument doc = new raddocument();                                     
XamlFormatProvider
 provider = new XamlFormatProvider(); doc = provider.Import(value.ToString()); foreach (Paragraph paragraph in doc.EnumerateChildrenOfType<Paragraph>()) {  //paragraph.Inlines  foreach(Inline line in paragraph.Inlines)  {        } }

In other words:

If i have my raddoucment as

string raddocstring =  "<t:RadDocument xmlns=""http://schemas.microsoft.com/winfx/2006/xaml/presentation""
                     xmlns:t=""clr-namespace:Telerik.Windows.Documents.Model;assembly=Telerik.Windows.Documents""
                     xmlns:s=""clr-namespace:Telerik.Windows.Documents.Model.Styles;assembly=Telerik.Windows.Documents""
                     version=""1.2"" LayoutMode=""Flow"" LineSpacing=""1.15"" LineSpacingType=""Auto"" ParagraphDefaultSpacingAfter=""12""
                     ParagraphDefaultSpacingBefore=""0"" SectionDefaultPageSize=""816,1056"">
                     <t:Section>
                        <t:Paragraph>
                          <t:Span ForeColor=""Red"" Text=""testing"" />
                          <t:Span ForeColor=""Blue"" Text=""testing"" />
                          <t:Span ForeColor=""Green"" Text=""testing"" />
                        </t:Paragraph>
                     </t:Section>
                     </t:RadDocument>";
how to get testing string from above raddocument paragraphs.... please advise...its very imp and urgent
 
Petya
Telerik team
 answered on 30 Oct 2012
12 answers
455 views
The RichTextBox has got a great merge-function.
We are very pleased with this feature.

Now and then we need a sort of master-detail possibility in our merge-letters.

Think about a mailmerge-letter to your customers.
We could use the mergefields for name, address and so on.
But you would like to use a mergefield to view a list of orders which is different for every customer. Master-detail!

Have you thought about something like that?

And how about combining the mailmerge in the RichTextBox with Telerik Reporting?
Petya
Telerik team
 answered on 30 Oct 2012
4 answers
201 views
I'm trying to provide a "formula editor" for an in-house application.  I'm trying out the Expression Editor to see if it will work for what we want ... notably, the list of fields available for to be used in a formula will be determined at run-time depending on the application state/context.

I haven't done very much with WPF, so just to get my feet wet, I followed the instructions in the "Getting Started" help topic to create a small app that uses the Expression Editor (with a grid view).

I then created an almost identical sample app that uses the Expression Editor without a Grid View. 
Since the field list will be "dynamic" I'm using an ExpandoObject as the view model, as described in this forum post.  And in fact the ExpandoObject properties do show up in the field list. 
However, the expression always seems to be invalid ... even for simple expressions like "Qty_1 * Unit_Price_1". 
Again, this is almost all identical to the previous iteration ... except that now I don't have a data grid, and I'm generating the "property bag" dynamically. Do I have to use the editor in conjunction with a RadGridView?  Or is it the dynamic properties that are the problem?


Here's my model:
<PRE>
public
class FormInfoModel
{
    public IDictionary<stringobject> Elements
    {
         get { return _elements; }
    }
    private IDictionary<stringobject> _elements;
    public FormInfoModel()
    {
         _elements = new Dictionary<stringobject>();
         _elements.Add("Order_Date"DateTime.Today);
         _elements.Add("Qty_1", 0);
         _elements.Add("Unit_Price_1", 0);
    }
}
</PRE>
...and the view model:
<PRE>public class FormInfoViewModel
{
    public
ExpandoObject Info
   
{
        get { return _info;
}
    }
    private ExpandoObject _info;
    public void SetInfo(FormInfoModel model)
    {
       
dynamic dobj = new ExpandoObject();
        foreach (var key in model.Elements.Keys)
       
{
            (dobj as
IDictionary<string, object>).Add(key, model.Elements[key]);
       
}
        _info =
dobj;
    }
}</PRE>

Then in the MainWindow constructor I set the binding programmatically:

  _viewModel = this.Resources["FormInfoViewModel"] as FormInfoViewModel;
   ExpressionEditor.Item =
_viewModel.Info;

 

Vlad
Telerik team
 answered on 30 Oct 2012
1 answer
96 views
We have these two error in VS output window, and we cannot find any "OffPostion" within our entire solution, then we looked into the RadControl source code we purchased, and found there is "OffPostion" property in Telerik.Windows.Controls.Gauge.IndicatorData.  Could you please look into it?

System.Windows.Data Error: 40 : BindingExpression path error: 'OffPostion' property not found on 'object' ''BarIndicator' (Name='TrackBar')'. BindingExpression:Path=OffPostion; DataItem='BarIndicator' (Name='TrackBar'); target element is 'IndicatorData' (HashCode=46355463); target property is 'OffPostion' (type 'Double')

System.Windows.Data Error: 40 : BindingExpression path error: 'OffPostion' property not found on 'object' ''Marker' (Name='CurrentFrameMarker')'. BindingExpression:Path=OffPostion; DataItem='Marker' (Name='CurrentFrameMarker'); target element is 'IndicatorData' (HashCode=15234483); target property is 'OffPostion' (type 'Double')

Thanks.



Andrey
Telerik team
 answered on 30 Oct 2012
6 answers
554 views
I'm using the RadGridView inside a RadPane and trying to drag a row to another grid in a different pane. If the pane is pinned it works perfectly but when the pane is not pinned I get the following error as soon as I start dragging:

System.InvalidOperationException was unhandled by user code
  Message=The specified Visual and this Visual do not share a common ancestor, so there is no valid transformation between the two Visuals.
  Source=PresentationCore
  StackTrace:
       at System.Windows.Media.Visual.TransformToVisual(Visual visual)
       at Telerik.Windows.Controls.DragDrop.DragDropProvider.OnDragInitialized(Object sender, DragInitializeEventArgs e) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\DragDrop\DragProviders\DragDropProvider.cs:line 60
       at Telerik.Windows.DragDrop.DragInitializeEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\DragDropManager\DragInitializeEventArgs.cs:line 95
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at Telerik.Windows.DragDrop.DragInitializer.StartDrag() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\DragDropManager\DragInitializer.cs:line 173
       at Telerik.Windows.DragDrop.DragInitializer.DragSourcePreviewMouseMove(Object sender, MouseEventArgs e) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\DragDropManager\DragInitializer.cs:line 157
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       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 args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
  InnerException:

I'm stumped as to how go about fixing this so any help would be appreciated!

-Gary
Jc
Top achievements
Rank 1
 answered on 30 Oct 2012
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?