Telerik Forums
UI for WPF Forum
1 answer
102 views
ZoomLevel only accepts and int and the difference between two levels is pretty large (e.g. 7 and 8 for the State shapefiles in the demos. Is there a way I can fake that in code somehow, I need just a little more zoom, not the huge zoom that going from 7 to 8 gives me?

Also, when adding labels to counties on a state map, the Location of GeographicalBounds.Center is often not desirable since it sometimes is not even within the same county as a result of oddly shaped counties. How can I tweak the Location placement when doing MapLayer.SetLocation(lblCounty, shape.GeographicalBounds.Center)?

Lastly, thanks for giving me this code a few weeks ago, but I have one more problem with it. The HotSpot makes my mouseover tooltip not work when the mouse is over the HotSpot - very confusing behavior for a user. How can I fix that? I've tried a few things, but can't seem to get it.

The code:
foreach (MapShape shape in this.InformationLayer.Items)
{
    string name = (string)shape.ExtendedData.GetValue("NAME");
    TextBlock lblCounty = new TextBlock();
    //lblCounty.Text = name.Substring(0, 2);
    lblCounty.Text = name;
    lblCounty.FontFamily = new FontFamily("Arial");
    lblCounty.FontSize = 9.5;
 
    if (name.ToLower().Equals("perry"))
    {
        RotateTransform rotateTransform;
        double newRotation = -20.00;
        rotateTransform = new RotateTransform(newRotation);
        lblCounty.RenderTransform = rotateTransform;
    }
    MapLayer.SetLocation(lblCounty, shape.GeographicalBounds.Center);
    MapLayer.SetHotSpot(lblCounty, hotSpot);
 
    this.LabelLayer.Items.Add(lblCounty);

If possible, I really need some answers this week.

Thanks in advance.
Andrey
Telerik team
 answered on 09 Dec 2010
1 answer
1.3K+ views
Hi ,

I am using telerik:RadGridView for my WPF Application .I need help on the following things.
  1. New Row Insertion
  2. In line Editing
  3. ComboBox,DateTime Picker,Check Box Column Styles  and Data Binding to Comobo Box Column Style.
  4. Binding DataTable to telerik:RadGridView  as Item Source.
  5. When i use DataTable as itemsource to telerik:RadGridView  it is not working properly
  6. After modifying the values in the telerik:RadGridView ,we need a updated data table of the grid view .
If any body had a sample with the above functionality in the grid could you please share with me.
Thanks in Advance.

Thanks,
Venkat Malladi.
Vanya Pavlova
Telerik team
 answered on 08 Dec 2010
2 answers
88 views
Hey Telerik!

I was looking at your Drag and Drop WPF demo for the Tree to Grid Drag and noticed the same problem that I am experiencing.  The scroll bar on All Products will not scroll allowing me to drop an Order below Jonhn's Amazing Keyboard.

Is this possible?

Thanks
Ryan
Ryan Black
Top achievements
Rank 1
 answered on 08 Dec 2010
8 answers
447 views
I have been having trouble selecting a treeview item that is located a few nodes deep.

You can see my example here: File Expand and Select

To get the example working, please copy the foo folder to c:\foo.

Thanks for all your help
Ryan
Ryan Black
Top achievements
Rank 1
 answered on 08 Dec 2010
4 answers
156 views
Hello,
After migrating from Telerik Telerik Q2 2010 to Q3 2010 wpf, the radWindow does not close properly  after the button 'Valider' is clicked!
Code :
Xaml file:

<UserControl x:Class="gcm.module.consultation.CreationMotifView"

   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

    xmlns:telerikNavigation="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Navigation"

    xmlns:telerik="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls" 

    xmlns:infrastructure="clr-namespace:gcm.infrastructure;assembly=gcm.infrastructure"

    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

   >

    <UserControl.Resources>

        <DataTemplate x:Key="IconTemplate">

            <Image Source="/gcm.resources;component/images/16/Motif.png"

              Stretch="None" />

        </DataTemplate>

    </UserControl.Resources>

    <telerikNavigation:RadWindow x:Name="window" Header="{x:Static infrastructure:Message.Popup_Motif_header}" WindowStartupLocation="CenterOwner" Margin="10,40,10,10" Height="135"  Width="450"

                           TopOffset="-50" ResizeMode="NoResize"

                           IconTemplate="{StaticResource IconTemplate}">

        <Grid>

            <Grid.Resources>

                <DataTemplate DataType="{x:Type ValidationError}">

                    <TextBlock

                    FontStyle="Italic"

                    Foreground="Red"

                    HorizontalAlignment="Right"

                    Margin="0,1"

                    Text="{Binding Path=ErrorContent}"

                />           

            </DataTemplate>

            </Grid.Resources>

            <Grid.ColumnDefinitions>

                <ColumnDefinition Width="60"/>

                <ColumnDefinition Width="*"/>

                <ColumnDefinition Width="120"/>

            </Grid.ColumnDefinitions>

            <Grid.RowDefinitions>

                <RowDefinition Height="30"/>

                <RowDefinition Height="*"/>

                <RowDefinition Height="35"/>

            </Grid.RowDefinitions>

            <Label Grid.Column="0" Grid.Row="1" Name="LibelleMotif" Content="{x:Static infrastructure:Message.Motif_Libelle}"></Label>

            <TextBox Grid.Column="1" Grid.Row="1" Name="TxtMotif"

                     Text="{Binding Path=txtMotif, ValidatesOnDataErrors=true, UpdateSourceTrigger=PropertyChanged}"

                     Height="23" Margin="0,0,35,0" VerticalAlignment="Top" TabIndex="0" />

            <ContentPresenter Grid.Row="1" Grid.Column="5"

                 HorizontalAlignment="Left" VerticalAlignment="Top"

                 Content="{Binding ElementName=TxtMotif, Path=(Validation.Errors).CurrentItem}"

                 DockPanel.Dock="Right"/>

            <Button Grid.Column="2" Grid.Row="2" Name="valider" Margin="0,0,33,9"

                    Command="{Binding Path=MotifCommande}" TabIndex="1" >valider</Button>

           

        </Grid>

    </telerikNavigation:RadWindow>

</UserControl>

Presenter :

       

public ICommand MotifCommande

        {

            get

            {

                if (this.mode == ModeNames.UPDATE)

                {

                    if (_updateCommand == null)

                    {

                        _updateCommand = new RelayCommand(

                        param => this.updateMotif(),

                        param => this.CanSaveMotif

                        );

                    }

                    return _updateCommand;

                }

                else

                {

                    if (_saveCommand == null)

                    {

                        _saveCommand = new RelayCommand(

                        param => this.createMotif(),

                        param => this.CanSaveMotif

                        );

                    }

                    return _saveCommand;

                }

            }

        }

            

        public void createMotif()

        {

            try

            {

                Motif motif = this.GetMotif();

                _motifRepository.CreateMotif(motif);

                this.View.window.Close();

                consultationController.MotifCreated(motif);

            }

            catch (Exception)

            {

               

            }

           

        }

bool CanSaveMotif

        {

            get

            {

                return true;

            }

        }

any idea?
Boyan
Telerik team
 answered on 08 Dec 2010
2 answers
197 views
Several examples I downloaded recently into VS2010 produced compile errors due to confilcting versions.  This seems to happen whether or not I update the example code.  I searched for other Telerik libraries but so far have not solved this problem.  I'm sure there is an easy answer.  Anyone?

Sincerely,
Richard

[Typical error text]
The primary reference "Telerik.Windows.Controls.GridView, Version=2010.1.309.35, Culture=neutral, PublicKeyToken=5803cfa389c90ce7, processorArchitecture=MSIL" could not be resolved because it has an indirect dependency on the .NET Framework assembly "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" which has a higher version "4.0.0.0" than the version "2.0.0.0" in the current target framework.
Troy Goddu
Top achievements
Rank 1
 answered on 08 Dec 2010
3 answers
300 views
Looking for an example or insight on how to change the way a date is displayed in ScheduleView with the TimeLine View.

My view will be displaying a month at a time. So I do not need the Time to display and only need the numeric day to display.

I tried to pull it out in Expression Blend, but did not see a Template or Style that relates to the date header. Or is it called something else?

Any help would be great.

Thanks!
Dani
Telerik team
 answered on 08 Dec 2010
3 answers
101 views
Hi

I am Devloping a wpf application which uses RadWindowManager and RadWindow control. I have a requirement that while click on a button on a parent window a new Modular Windows Popup and when I click on Mimimize icon of that Modular window that should Mimimize inside that parent window through which tthat modular windows open's up. I dont want that modular window to show on windows taskbar in any of the state.

Kindly suggest of can I implement this.
Miroslav Nedyalkov
Telerik team
 answered on 08 Dec 2010
2 answers
83 views
Just curious, as this is possible in Winforms, but didn't see an example in the WPF demo. Is it possible to have 2 (or more) child grids?

Kind regards,
Stijn
Myth
Top achievements
Rank 1
 answered on 08 Dec 2010
1 answer
263 views
I have a RadGridView bound to a collection of ObservableCollection<Foo>. I am trying to bind a Command from the view model to a RadContextMenu, but it would seem that no matter how you describe the RelativeSource to the DataContext, the RadContextMenu is only taking its binding from the ItemsSource of the RadGridView. The routing worked perfectly well in the past using ContextMenu.MenuItem and using the hack of binding to the PlacementTarget.Tag, but no longer works when I changed from MenuItem to RadMenuItem (which are much nicer). I have had to resort to RadMenuItem_Click since I can find no way of getting the binding to work.

<Controls:RadGridView ShowGroupPanel="False"
                                  Grid.Row="1"
                                  x:Name="radGridView"
                                  DockPanel.Dock="Top"
                                  DataContext="{Binding}"
                                  d:DataContext="{d:DesignData Source=../../DesignData/SampleBinderCollection.xaml}"
                                  ItemsSource="{Binding}"
                                  AutoGenerateColumns="False"
                                  IsSynchronizedWithCurrentItem="True"
                                  SelectedItem="{Binding DataContext.SelectedBinder,Mode=TwoWay, RelativeSource={RelativeSource AncestorType=Window}}"
                                  IsReadOnly="True"
                                  Tag="{Binding RelativeSource={RelativeSource AncestorType=Window}, Path=DataContext}"
                                  FrozenColumnCount="5"
                                  ShowColumnFooters="True"
                                  DataContextChanged="RadGridView_OnDataContextChanged">
                <Controls1:RadContextMenu.ContextMenu>
                    <Controls1:RadContextMenu>
                        <Controls1:RadMenuItem Header="Go to this invoice/transaction"
                                  Command="{Binding DataContext.OpenTransactionWindowFromInvoiceCommand, RelativeSource={RelativeSource AncestorType=Window}}"
                                               Click="RadMenuItem_Click">
                            <Controls1:RadMenuItem.Icon>
                                <Image Source="/Cornhouse;component/Images/NewCardHS.png"
                                       Width="16"
                                       Height="16" />
                            </Controls1:RadMenuItem.Icon>
                        </Controls1:RadMenuItem>
                     </Controls1:RadContextMenu>
                </Controls1:RadContextMenu.ContextMenu>
 
etc ....
 
The viemodel is simply
public class MyViewModel:INotifyPropertyChanged
{
    public ICommand OpenTransactionWindowFromInvoiceCommand {get etc}
    public ObservableCollection<Foo> Collection
     { 
       get{return _collection;}
       set{
_collection=value;
           RaisePropertyChanged("Collection");
}           
}

I would really appreciate some help with this.

Many thanks
Jeremy
Konstantina
Telerik team
 answered on 08 Dec 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
SplashScreen
Rating
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
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Cynthia
Top achievements
Rank 1
Iron
Toby
Top achievements
Rank 3
Iron
Iron
Iron
Danielle
Top achievements
Rank 1
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Iron
yw
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?