Telerik Forums
UI for WPF Forum
4 answers
638 views
Hi, how can i access the expander button (expand/collapse command)?
Basicly i need this button to be all over the header.
Thank you
Dimitrina
Telerik team
 answered on 06 May 2010
2 answers
159 views
Hello,

I have a RadRibbonSplitButton, whose DropDown Content is set to a plain UserControl housing only a single ListBox and a single 'Accept' button. This ListBox has some drag/drop code written to allow drag/drop of a row to another position within the same ListBox. Essentially, just repositioning a row within the ListBox to another position. When 'Accept' is pushed, I use the order of the rows in logic elsewhere in the app. If the context menu is clicked out of it disappears correctly, and if the user never clicks outside of the control, they are able to effectively select listbox items as they like, and drag/drop the listbox items to whatever positions they desire, all with the RadRibbonSplitButton drop down staying open until the 'Accept' button is pressed or the user clicks somewhere besides the drop down.

My problem, is that in WPF, anytime I clicked within the listbox, the RadRibbonSplitButton closes, (I believe a routed event may be getting handled here from the ListBoxItem Selection, and RadRibbonSplitButton handles that and closes the drop down) I set 'KeepOpen' to true, to get around this in WPF.

But whenever a Drag is initiated from one of these ListBox Items, the drag cue is displayed correctly and hovers while I drag, but the RadRibbonSplitButton drop down closes immediately. (So there is no List Box showing for me to reposition the ListBox Item being dragged)

I noticed this thread http://www.telerik.com/community/forums/wpf/draganddrop/drag-and-drop-between-a-window-and-a-popup.aspx, which notes that you cannot drag/drop between pop ups, but in my scenario I am just dragging/dropping within a single RadRibbonSplitButton drop down...

Do you have any suggestions that might help me achieve the functionality I am after, having the RadRibbonSplitButton drop down remain open until the 'Accept' button is pressed, or until the user clicks outside of the drop down. Not closing immediately, when a drag is initiated from within the drop down's ListBox?

Thanks for any help you can give!

- Lee
Tina Stancheva
Telerik team
 answered on 06 May 2010
5 answers
176 views
I started with the example with the Leages and Division (as example for data binding from the Demo) and added a tristate checkbox to the treeview and a "bool?" in each class. Initially all items are set to "true".
public League(string name) 
  _name = name; 
  _divisions = new List<Division>(); 
  _selected = true
 
string _name; 
bool? _selected; 
 
public string Name { get { return _name; } } 
public bool? Selected { get { return _selected; } } 
 

As described here I added the CheckStateConverter class which also handles the Indeterminate state.

public class CheckStateConverter : IValueConverter 
  public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) 
  { 
    bool? result = (bool?)value; 
    ToggleState returnValue = ToggleState.Indeterminate; 
    if (result == true
      returnValue = ToggleState.On; 
    else 
    { 
      if (result == false
        returnValue = ToggleState.Off; 
    } 
 
    return returnValue; 
  } 
//.... 

The data binding works fine, but the thing I can't understand: If I expand "League A" and "Division A" and uncheck "Team I",  "League A" and "Division A" also switch to "unchecked" instead of "indeterminate". If I uncheck "League A" and check it again the whole tree behaves correctly. What is wrong in my example?

Thanks in advance!
Jan
Rick Bednarik
Top achievements
Rank 1
 answered on 06 May 2010
7 answers
148 views
Hi there,

I am getting a serious NullReferenceException (haven't managed to catch it by exceptions and it crashes my client), and it goes something like this:

   at Telerik.Windows.Controls.Map.BingMapProvider.InitializeProvider() in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\DataVisualization\Map\Providers\BingMapProvider.cs:line 542
   at Telerik.Windows.Controls.Map.BingMapProvider.ImageryService_GetImageryMetadataCompleted(Object sender, GetImageryMetadataCompletedEventArgs e) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\DataVisualization\Map\Providers\BingMapProvider.cs:line 499
   at Telerik.Windows.Controls.Map.VEWPFImageryService.ImageryServiceClient.OnGetImageryMetadataCompleted(Object state) in c:\Builds\WPF_Scrum\Release_WPF\Sources\Development\Controls\DataVisualization\Service References\VEWPFImageryService\Reference.cs:line 2106
   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)

It seems to be happening at random, so I can't pin it down.  Is there any way I can solve this please?

Thanks,
Simon.



Andrey
Telerik team
 answered on 06 May 2010
1 answer
137 views
Hi I am having problems trying to bind the radChart to a ms access database. Does anyone have a solution?. Or just a short tutorial. I see none in this forum at all.
Ves
Telerik team
 answered on 06 May 2010
1 answer
98 views
Hi,

I try to create a Radcontrol WPF Project, but an error occur during creation.
You can see the detail of the error in the attached file.

Conf:
VS 2010 RTM
RadControl for WPF 2010.1.422

Kind regards.
Erjan Gavalji
Telerik team
 answered on 06 May 2010
1 answer
83 views
Hi,

I am trying to draw a line graph with two data series with each data series with about 80000 data points - that performs well? I find that after about 1000 data points it is a hog.

Is there anyway to create a line graph with 80K datapoints that is fairly quick? I don't need any frills on the chart - simple vanilla chart would be great.


thanks in advance,
Jas
Sia
Telerik team
 answered on 06 May 2010
1 answer
107 views
1. I have a column in my Grid. It is not allowed to use grouping for this column (IsGroupable="False" ). When I try to drag-drop the column-title to the GroupPanel it just does not do anything. And that is what is expected, but the"not-allowed-image" did not show up.
2. Another column in the Grid is allowed to use grouping. When I drag-drop the title to the GroupPanel everything works fine.
But... when I try to drag-drop the title back again, this also works, but now the "not-allowed-sign" shows up.

Should this not be the other way around: the "not-allowed-sign" shows when I try to group a column with IsGroupable="False"...?
Veselin Vasilev
Telerik team
 answered on 06 May 2010
1 answer
184 views
Hi

I have a small problem. When I validate a TextBoxes Value and than giving the User a visual feedback everything works prefectly fine.

When I do this with a RadComboBox, the only thing that works is the validation part. But I don't get any visual feedback. Here is the XAML part in my App.xaml

<Application x:Class="CDM.App" 
             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" 
             xmlns:telerikInput="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Input" 
             > 
    <Application.Resources> 
    <Storyboard x:Key="FlashError"
            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"  
                                       Storyboard.TargetProperty="(UIElement.Visibility)"
                <DiscreteObjectKeyFrame KeyTime="00:00:00" Value="{x:Static Visibility.Visible}"/> 
                <DiscreteObjectKeyFrame KeyTime="00:00:05" Value="{x:Static Visibility.Hidden}"/> 
            </ObjectAnimationUsingKeyFrames> 
        </Storyboard> 
    <Style x:Key="myErrorTemplate" TargetType="Control"
        <Setter Property="Validation.ErrorTemplate"
            <Setter.Value> 
                <ControlTemplate> 
                    <StackPanel Orientation="Vertical"
                        <Border BorderBrush="Red" BorderThickness="1"
                            <AdornedElementPlaceholder Name="mycontrol"
 
                                <Label Foreground="White" Background="Red"  
                                           Content="{Binding ElementName=mycontrol,  
                                                     Path=AdornedElement.(Validation.Errors)[0].ErrorContent}"> 
                                        <Label.Triggers> 
                                            <EventTrigger RoutedEvent="FrameworkElement.Loaded"
                                                <BeginStoryboard Storyboard="{StaticResource FlashError}" /> 
                                            </EventTrigger> 
                                        </Label.Triggers> 
                                    </Label> 
                            </AdornedElementPlaceholder> 
                        </Border> 
 
                        <!--<Label Foreground="White" Background="Red"  
                                           Content="{Binding ElementName=mycontrol,  
                                                     Path=AdornedElement.(Validation.Errors)[0].ErrorContent}"> 
                        </Label>--> 
                    </StackPanel> 
                </ControlTemplate> 
            </Setter.Value> 
        </Setter> 
        <Style.Triggers> 
 
            <Trigger Property="Validation.HasError" Value="true"
                <Setter Property="ToolTip"  
                            Value="{Binding  
                                    RelativeSource={x:Static RelativeSource.Self}, 
                                    Path=(Validation.Errors)[0].ErrorContent}" /> 
            </Trigger> 
        </Style.Triggers> 
    </Style> 
 
      <Style TargetType="TextBox" BasedOn="{StaticResource myErrorTemplate}" /> 
    <Style TargetType="CheckBox" BasedOn="{StaticResource myErrorTemplate}" /> 
        <Style TargetType="telerik:RadComboBox" BasedOn="{StaticResource myErrorTemplate}" /> 
    </Application.Resources> 
</Application> 
 

And here the the C# Part for Validation. Allthough I am convincied that the validation works. Tested it several times.

    public Platten() 
        { 
            this.preisReference.AssociationChanged += new CollectionChangeEventHandler(preisReference_AssociationChanged); 
 
            this.AddError("preis""Preiscode fehlt!"); 
        } 
 
        void preisReference_AssociationChanged(object sender, CollectionChangeEventArgs e) 
        { 
            if (e.Action == CollectionChangeAction.Remove) 
            { 
                OnPropertyChanging("preis"); 
            } 
            else 
            { 
                if (e.Action == CollectionChangeAction.Add) 
                { 
                    this.RemoveError("preis"); 
                } 
                OnPropertyChanged("preis"); 
            } 
        } 
        #region IDataErrorInfo Members 
        private Dictionary<stringstring> m_validationErrors = new Dictionary<stringstring>(); 
 
        private void AddError(string columnName, string msg) 
        { 
            if (!m_validationErrors.ContainsKey(columnName)) 
            { 
                m_validationErrors.Add(columnName, msg); 
            } 
        } 
 
        private void RemoveError(string columnName) 
        { 
            if (m_validationErrors.ContainsKey(columnName)) 
            { 
                m_validationErrors.Remove(columnName); 
            } 
        } 
 
        public bool HasErrors 
        { 
            get { return m_validationErrors.Count > 0; } 
        } 
 
        public string Error 
        { 
            get 
            { 
                if (m_validationErrors.Count > 0) 
                { 
                    return "Customer data is invalid"
                } 
                else 
                { 
                    return null
                } 
            } 
        } 
 
        public string this[string columnName] 
        { 
            get 
            { 
                if (m_validationErrors.ContainsKey(columnName)) 
                { 
                    return m_validationErrors[columnName]; 
                } 
                else return null
            } 
        } 
        #endregion 


Thanks for your help.






Hristo
Telerik team
 answered on 06 May 2010
2 answers
150 views
Hi,
I added items to a treeview programmatically(with two for loop) and set the tag property to a value for each of an Child item.  But there is a problem.

 

 

 

RadTreeViewItem rti;

 

 

for (int i = 0; i < ParentCount; i++)

 

{

 

  rti =

new RadTreeViewItem();

 

  rti.Header = Parent[i].Name;

 

 

  for (int j = 0; j < ChildCount; j++)

 

    {

    rti.Items.Add(Child[j].Name);

 

    rti.Tag = Child[j].Number);

 

   

}

  MyRadTreeView.Items.Add(rti); //MyRadTreeView is declared at XAML code.

}

I want to reach rti's Tag property from any of an event(Selected, SelectionChange...), but none of these events give me the Tag property's value. The Tag's value comes with null. 
How can I achieve this issue?

EMRE ANDIC
Top achievements
Rank 1
 answered on 06 May 2010
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?