Telerik Forums
UI for WPF Forum
6 answers
209 views
Hi Telerik team,

Thanks for the reply. It's working now.

One final question I have right now, Please respond.

Can we measure the openstreemap means you click on some points and it draws a poly line and during that time it shows the length of that polyline in meters / feet.

Please let me know if it possible or not?

If you have some sort of sample code please pass over it.

Thanks for your help.
Vivek,
Vivek
Top achievements
Rank 1
 answered on 09 Aug 2011
2 answers
147 views
I have a RadRibbonComboBox in a RadRibbonTab in a RadRibbonBar.  Looks something like this:

<telerik:RadRibbonBar>
    <telerik:RadRibbonTab Header="Tab 2" x:Name="Tab2">
        <telerik:RadRibbonGroup Header="Select an item">
            <StackPanel Orientation="Vertical" Margin="0,5,0,0">
                <telerik:RadRibbonComboBox Name="myComboBox" Margin="0,5,0,0" >
                    <telerik:RadRibbonComboBoxItem Content="New Item..." Selected="NewItem_Selected"></telerik:RadRibbonComboBoxItem>
                </telerik:RadRibbonComboBox>
            </StackPanel>
        </telerik:RadRibbonGroup>
    </telerik:RadRibbonTab>
</telerik:RadRibbonBar>

I have defined three different Data Templates in the resources like this:

<UserControl.Resources>
    <DataTemplate x:Key="EmptyTemplate1">
        <TextBlock FontStyle="Italic" Text="Select a value from the list" />
    </DataTemplate>
    <DataTemplate x:Key="EmptyTemplate2">
        <TextBlock FontStyle="Italic" Text="There are no selections at this time" />
    </DataTemplate>
    <DataTemplate x:Key="EmptyTemplate3">
        <TextBlock FontStyle="Italic" Text="Please complete the first tab before selecting" />
    </DataTemplate>
</UserControl.Resources>

I want to use a specific Data Template for the EmptySelectionBoxTemplate depending on various conditions.  Therefore, I want to set the EmptySelectionBoxTemplate in code.  I have tried setting the template like this:

myComboBox.EmptySelectionBoxTemplate = (DataTemplate)FindResource("EmptyTemplate1");

The resource is found, and appears to be set in the combo box, but the display does not get altered.  I also tried invalidating the property and visual state:

myComboBox.InvalidateProperty(RadComboBox.EmptySelectionBoxTemplateProperty);
myComboBox.InvalidateVisual();

Invalidating did not help.  The combo box selection is -1, and if I set the EmptySelectionBoxTemplate in XAML, the box displays the message correctly.

What is the correct way to change this template in code?
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
 answered on 09 Aug 2011
1 answer
228 views

Hi Team Telerik,

 

 

   RadRichtextBox property  IsSpellCheckingEnabled is set to True ,but it is not working properly .All lowercase letters are getting  marked   as  having spellerror and for uppercase letters spellerror is not getting marked.

Code:-

 

 

 

RichTextBox1.IsSpellCheckingEnabled =True
RichTextBox1.Language = Markup.XmlLanguage.GetLanguage(CultureInfo.CurrentCulture.Name)

 

 

 

 

 

 

 

 

 

Iva Toteva
Telerik team
 answered on 09 Aug 2011
1 answer
142 views
Is there any possibility to pin/unpin rows or columns in the datagridview for WPF? I am highly looking for somehting like that and I thought due to the fact that you have somehting in for WinForms that it is also in for WPF.

I'd really like to know how to pin records in WPF. can you suggest somehting?
Thanks
Ivan Ivanov
Telerik team
 answered on 09 Aug 2011
6 answers
118 views
Hi,

I'm creating facility to jump to a specific selection (think of a calendar which has a "Today" button to jump immediately to a specific date). This facility changes both the SelectionStart and SelectionEnd properties in two separate operations, however this causes the SelectionChanged event to be triggered twice, once for each operation. Can an "AddSelection(start, end)" method be included change both properties in one operation and only trigger the SelectionChanged event once? (Similar events could be added for VisiblePeriod and Period). I've based this request on a similar AddRange method for the RadChart control that allows the minimum, maximum and step properties to be changed in one operation.

Kind regards,
Dave.
David
Top achievements
Rank 2
 answered on 09 Aug 2011
1 answer
239 views
Hi all, I have Docking with different RadPane in it. Each RadPane have different functionality that spawns a worker thread to get information, I would like to be able to stop the worker thread if the RadPane is not visible. 

I cannot seem to find an event that I can attached to watch this behavior. Any suggestions? I tried watching loading, unloading of rad pane but that does not work since switching tabs in the docked state does not trigger these events.

Any suggestions?
Konstantina
Telerik team
 answered on 09 Aug 2011
2 answers
646 views
Hi,

I have a custom control based off a standard WPF control:

Public Class SendButton
    Inherits System.Windows.Controls.Button

I have also themed standard WPF controls to adopt the current Telerik theme in the Application.Resources of the main app:

<ResourceDictionary
    <Style
        TargetType="{x:Type Button}">
        <Setter
            Property="telerik:StyleManager.Theme"
            Value="{x:Static telerik:StyleManager.ApplicationTheme}" />
    </Style>

Standard WPF controls successfully inherit the Telerik theme, however custom controls based off standard WPF controls do not inherit the Telerik theme.

How can I theme my custom controls to inherit the Telerik theme? I do not want to the change the inheritance of the custom control to a Telerik control to keep the controls as lightweight as possible (the custom controls do not require the additional features of the Telerik controls). I would like to maintain a consistent user experience over the entire solution and theme my custom controls with the Telerik theme.

Kind regards,
Dave.
David
Top achievements
Rank 2
 answered on 09 Aug 2011
1 answer
143 views
Hello

I have tried to link my data model with SQLite database using configuration file and it works fine but i faced this problem.
When i tried an example of the data model (Classes) and data access layer the in same project it works fine, but when i separated the data model in a class library it always gives this error when i tried to get the Scope:

theObjectScopeProvider1.myScope = GetNewObjectScope();
// The Error  : Could not load file or assembly 'System.Data.SQLite'

I added the reference of 'System.Data.SQLite' to class library as usual and it was working when i convert the project from class library to Console application and invoke the scope.
By the way i tried to load the assembly dynamically from the AdjustForDynamicLoad function but nothing changed:
static public void AdjustForDynamicLoad()
        {
            Assembly SQLiteAssembly = Assembly.LoadFile(@"C:\Lib\System.Data.SQLite.DLL");
            if( theObjectScopeProvider1 == null )
                theObjectScopeProvider1 = new ObjectScopeProvider1();
 
            if( theObjectScopeProvider1.myDatabase == null )
            {
                string assumedInitialConfiguration =
                           "<openaccess>" +
                               "<references>" +
                                   "<reference assemblyname='PLACEHOLDER' configrequired='True'/>" +
                                   "<reference assemblyname='PLACEHOLDEZ' configrequired='False'/>" +
                               "</references>" +
                           "</openaccess>";
                System.Reflection.Assembly dll = theObjectScopeProvider1.GetType().Assembly;
                assumedInitialConfiguration = assumedInitialConfiguration.Replace("PLACEHOLDER", dll.GetName().Name);
                //assumedInitialConfiguration = assumedInitialConfiguration.Replace("PLACEHOLDEZ", SQLiteAssembly.GetName().Name);
                System.Xml.XmlDocument xmlDoc = new System.Xml.XmlDocument();
                xmlDoc.LoadXml(assumedInitialConfiguration);
                Database db = Telerik.OpenAccess.Database.Get("SQLiteDatabaseConnection",
                                            xmlDoc.DocumentElement,
                                            new System.Reflection.Assembly[] { dll, SQLiteAssembly. } );
 
                theObjectScopeProvider1.myDatabase = db;
            }
        }
 
So, the problem is how to add reference or assembly to the scope.

Thanks in advance.
zenus
Top achievements
Rank 1
 answered on 09 Aug 2011
5 answers
240 views
As the title implies, I'm having trouble implementing a stand-alone RadClock (no TimePicker involved) control in my WPF app. Before the latest upgrade (my current version is Q1 2011), it worked smoothly (i set the Culture property to get rid of the 'AM/PM' suffixes), but now it just won't show the times from 0:00 to 23:00. My attempt:

<telerik:RadClock HorizontalAlignment="Left" Margin="1,7,0,0" Name="radTimeFrom" Culture="sl-SI"  VerticalAlignment="Top" Width="166" Height="145">
           <telerik:RadClock.Header>
               <TextBlock Text="From" Foreground="White"/>
           </telerik:RadClock.Header>
       </telerik:RadClock>

Any ideas as to why this thing doesn't work anymore? :)

EDIT: I tried reverting to an older version of the Telerik controls (ver. Q3 2009 SP2) and it works just fine.
EDIT2: But, of course, this is not a solution, because i would still like to have the latest Telerik controls installed, therefore reverting in my case is out of the question. Any info would be greatly appreciated :)



Thanks in advance,
Concerned Developer
Sandi Markon
Top achievements
Rank 1
 answered on 09 Aug 2011
1 answer
142 views
Hi, i have a project where i use your RadGridView Control, and pass an IQueryable as the ItemsSource property, but the following is happening:

When i select one of the checkboxes from a columnfilter, all works ok (only the items represented by the selected value appears), but when i unchecked it nothing appears in the gridview (the grid view shows no data [no lines]), but the sql that is passed to the database is ok! (i got it with the SqlServer Profile), the same doesn't happen if i click the clear filter button (all the data is showed in the grid).

Regards,
Miguel Freire
Rossen Hristov
Telerik team
 answered on 09 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?