Telerik Forums
UI for WPF Forum
0 answers
126 views
Hi..
In your custom column example with the DateTimePicker. How do you set the theme of the DateTimePicker?
I've copied the code but am unable to set the theme or turn off the Week numbers.
thx


                            <controls:DateTimePickerColumn DataMemberBinding="{Binding CallActivity_date}" telerik:StyleManager.Theme="Vista" 
Header="Date/Time" HeaderTextAlignment="Left"
TimeInterval="0:30:0"
Width="155"
DataFormatString="g" >
                              </controls:DateTimePickerColumn>
Jon
Top achievements
Rank 1
 asked on 30 Oct 2012
0 answers
125 views
Hi,

Our client has reported an error produced on filter when item has any underscore. We are using Telerik 2012.2.607.40

If user clicks on checkboxes it filters items as expected but if user clicks on text it raises the following exception:

System.ArgumentNullException was unhandled
  Message=Value cannot be null.
Parameter name: element
  Source=Telerik.Windows.Controls
  ParamName=element
  StackTrace:
       at Telerik.Windows.Controls.ParentOfTypeExtensions.<GetParents>d__0.MoveNext() in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Extensions\ParentOfTypeExtensions.cs:line 74
       at System.Linq.Enumerable.<OfTypeIterator>d__aa`1.MoveNext()
       at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source)
       at Telerik.Windows.Controls.GridView.FilteringDropDown.ShouldCloseOnMouseButton(UIElement eventOriginalSource) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\FilteringDropDown.cs:line 386
       at Telerik.Windows.Controls.GridView.FilteringDropDown.Telerik.Windows.Controls.IPopupWrapperOwner.ShouldCloseOnMouseButtonDown(UIElement eventOriginalSource) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Filtering\FilteringDropDown.cs:line 376
       at Telerik.Windows.Controls.AutoClosePopupWrapper.OnPreviewMouseButtonDown(Object sender, MouseButtonEventArgs e) in c:\TB\117\WPF_Scrum\Release_WPF\Sources\Development\Core\Controls\Popup\AutoCloseWrapper\AutoClosePopupWrapper.cs:line 207
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
...

It is easy to reproduce with this code.

MainWindow.xaml
<Window x:Class="TestUnderscore.MainWindow"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Controls="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.GridView" Title="MainWindow" Height="350" Width="525">
    <Grid>
        <Controls:RadGridView x:Name="RadGridView"/>
    </Grid>
</Window>

MainWindow.xaml.cs
namespace TestUnderscore
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
 
            var items = new ObservableCollection<string>();
            for (int i = 0; i < 50; i++ )
            {
                items.Add("Item_" + i);
            }
            this.RadGridView.ItemsSource = items;
        }
    }
}

Mikel
Top achievements
Rank 1
 asked on 30 Oct 2012
2 answers
262 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
134 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
163 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
274 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
207 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
729 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
469 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
206 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
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
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?