标签: silverlight-toolkit

silverlight 3:如何创建可调整大小的儿童窗口?

有没有办法在silverlight 3中创建一个可调整大小的子窗口?任何指针都非常感谢.

silverlight silverlight-toolkit

4
推荐指数
1
解决办法
7431
查看次数

Silverlight 4工具包,charting和lineSeries为null

我使用Silverlight 4工具包创建了Silverlight图表,即4月发布.

请考虑以下图表:

 <Grid x:Name="LayoutRoot" Background="White">
  <Charting:Chart Title="Chart to test" Name="MySuperChart">
   <Charting:LineSeries x:Name="MyLineSeries" Title="Something" />
  </Charting:Chart>
 </Grid>
Run Code Online (Sandbox Code Playgroud)

到现在为止还挺好.我可以访问图表中的系列MySuperChart.Series[0]但是当我尝试引用MyLineSeries时,它似乎是空的. 图片http://i41.tinypic.com/9k4h7t.png 完整视图

silverlight charts silverlight-toolkit

4
推荐指数
1
解决办法
2572
查看次数

绘制列图,列之间没有空格

我正在使用WPF工具包,我正在尝试渲染一个看起来像直方图的图形.特别是,我希望每列都与每个列相对应.列之间应该没有间隙.

创建列图时,您应用了许多组件.(参见下面的示例XAML).有没有人知道你是否可以在其中一个元素上设置属性,这些元素指的是列之间的空白宽度?

                <charting:Chart Height="600" Width="Auto" HorizontalAlignment="Stretch" Name="MyChart"
                    Title="Column Graph" LegendTitle="Legend">

                    <charting:ColumnSeries 
                        Name="theColumnSeries"
                        Title="Series A"
                        IndependentValueBinding="{Binding Path=Name}"                
                        DependentValueBinding="{Binding Path=Population}"
                        Margin="0"
                        >
                    </charting:ColumnSeries>

                    <charting:Chart.Axes>
                        <charting:LinearAxis 
                            Orientation="Y" 
                            Minimum="200000" 
                            Maximum="2500000" 
                            ShowGridLines="True" />
                        <charting:CategoryAxis
                            Name="chartCategoryAxis"
                            />
                    </charting:Chart.Axes>
                </charting:Chart>
Run Code Online (Sandbox Code Playgroud)

wpf charts graph wpftoolkit silverlight-toolkit

4
推荐指数
1
解决办法
2810
查看次数

WP7在Pivot控件中切换开关?

有没有办法控制轻弹动作的阈值来打开/关闭切换开关,这样它就不会弄乱枢轴控制的导航?

windows silverlight silverlight-toolkit windows-phone-7

4
推荐指数
1
解决办法
3719
查看次数

ListBoxDragDropTarget不会重新排序使用继承的元素

我有一个非常奇怪的问题,我不知道如何调试它.(旁注:我讨厌创建GUI!无论如何...... :)

我一直在遵循指南,在Silverlight上使用drag'n drop.现在,我感兴趣的是列表中的重新排序.

如果我完全按照网站上的例子,一切都很好.它按预期工作. 但是,当我尝试用其他东西替换元素时,我再也无法重新排序了?!

考虑以下XAML:

<toolkit:ListBoxDragDropTarget AllowDrop="True">
                <ListBox Width="200" Height="500" x:Name="FromBox" DisplayMemberPath="Label">
                    <ListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                            <StackPanel/>
                        </ItemsPanelTemplate>
                    </ListBox.ItemsPanel>
                </ListBox>
            </toolkit:ListBoxDragDropTarget>
Run Code Online (Sandbox Code Playgroud)

除了DisplayMemberPath(此处为"Label")之外,这与我正在阅读的文章相同.

在代码隐藏中,我现在执行以下操作:

void MainPage_Loaded(object sender, RoutedEventArgs e)
        {
            FromBox.ItemsSource = GetElements();
        }

        public static ObservableCollection<Element> GetElements()
        {
            ObservableCollection<Element> Elements = new ObservableCollection<Element>();
            var Label = new Label();
            Label.Label = "Label me";
            Elements.Add(Label);

            var IntegerBox = new IntegerBox();
            IntegerBox.Label = "Størrelsen på en gennemsnits svale:";
            IntegerBox.Description = "cm";
            Elements.Add(IntegerBox);

            var TextBox = new TextBox();
            TextBox.Label = "QTTextBox";
            Elements.Add(TextBox); …
Run Code Online (Sandbox Code Playgroud)

silverlight silverlight-toolkit silverlight-4.0

4
推荐指数
1
解决办法
2170
查看次数

WP7上ListPicker的caliburn.micro绑定约定

我正在为一个新项目尝试使用caliburn.micro框架,但我坚持使用绑定ListPicker(工具包中的那个).当我将控件更改为简单的DropDown时,一切都按预期工作.我假设DropDown工作正常,因为这里实现了默认约定:

AddElementConvention<Selector>(Selector.ItemsSourceProperty, "SelectedItem", "SelectionChanged")
    .ApplyBinding = (viewModelType, path, property, element, convention) => {
        if (!SetBinding(viewModelType, path, property, element, convention))
            return false;

        ConfigureSelectedItem(element, Selector.SelectedItemProperty,viewModelType, path);
        ApplyItemTemplate((ItemsControl)element, property);

        return true;
    };
Run Code Online (Sandbox Code Playgroud)

ListPicker没有实现Selector,所以我试图在我的引导程序中添加一个自定义约定:

static void AddCustomConventions() {
    AddElementConvention<ListPicker>(ListPicker.ItemsSourceProperty, "SelectedItem", "SelectionChanged")
        .ApplyBinding = (viewModelType, path, property, element, convention) => {
            ConventionManager.ConfigureSelectedItem(element, ListPicker.SelectedItemProperty,viewModelType, path);
            return true;
        };
}
Run Code Online (Sandbox Code Playgroud)

不幸的是,这不起作用.你能帮我吗?

c# silverlight-toolkit windows-phone-7 caliburn.micro listpicker

4
推荐指数
1
解决办法
929
查看次数

将水平线添加到Silverlight Toolkit柱形图

我在WPF项目中使用Silverlight Toolkit,我想在我可以指定的Y轴值的柱形图中添加一条红色虚线水平线.我已经修改了图表模板并成功添加了一行,但我不知道如何让行显示在我想要的y轴值以及如何让它在整个图表中展开.这是我到目前为止的图表图片: 在此输入图像描述

这是我用来生成它的图表模板XAML代码:

            <charting:Chart Name="chartUsageHours" Grid.Column="1" BorderThickness="0" Padding="0" Loaded="chartUsageHours_Loaded">
            <charting:Chart.Template>
                <ControlTemplate TargetType="{x:Type charting:Chart}">
                    <Border Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Padding="{TemplateBinding Padding}">
                        <Grid>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="Auto" />
                                <RowDefinition Height="*" />
                            </Grid.RowDefinitions>
                            <datavis:Title Content="{TemplateBinding Title}" Style="{TemplateBinding TitleStyle}" />
                            <chartingprimitives:EdgePanel Name="ChartArea" Style="{TemplateBinding ChartAreaStyle}" Grid.Row="1" Margin="0,0,0,0">
                                <Grid Panel.ZIndex="-1" Style="{TemplateBinding PlotAreaStyle}" />
                                <Border Panel.ZIndex="10" BorderBrush="#FF919191" BorderThickness="1, 0, 0, 1" />
                                <Grid Name="HoursThresholdContainer" Canvas.ZIndex="1" Background="Transparent">
                                    <Grid Name="HoursThreshold">
                                        <Line Name="Horizontal" HorizontalAlignment="Stretch" X1="0" Y1="100" X2="600" Y2="100" Stroke="Red" StrokeDashArray="4, 2"/>
                                    </Grid>
                                </Grid>
                            </chartingprimitives:EdgePanel>
                        </Grid>
                    </Border>
                </ControlTemplate>
            </charting:Chart.Template>
            <charting:Chart.Series> …
Run Code Online (Sandbox Code Playgroud)

wpf silverlight-toolkit

4
推荐指数
1
解决办法
2787
查看次数

Silverlight工具包; 饼图颜色

我有一个我无法弄清楚的巨大问题.假设我有五种不同的水果,我希望它们中的每一种都与某种颜色相关联.假设我有三个"篮子",其中包含零个或多个所述水果.

当我为我的三个篮子制作饼图时,每个楔子只是一些随机颜色,可由控件选择.我怎么说,在图表中做蓝莓蓝,bannanas黄色等?

我知道这是一个奇怪的问题,但我想不出更简单的描述方式.

我不在乎解决方案是在XAML还是代码中,只要它有效.

c# silverlight silverlight-toolkit silverlight-4.0 pie-chart

4
推荐指数
1
解决办法
5382
查看次数

捏缩放在列表框中的图像

我正在尝试在我的应用程序中实现压缩缩放.我找到了这篇文章(在Silverlight中正确缩放 - 缩放),它可以很好地适用于一个图像.但问题是,我的图像在列表框内,如下面的XAML所示:

<ListBox x:Name="lstImage" Margin="-20,-23,-12,32" Height="709" Width="480">
    <ListBox.ItemTemplate>
        <DataTemplate>
            <Image Source="{Binding Path=ImageSource}" VerticalAlignment="Top" Margin="10,12,10,10" Width="640" Height="800">
            </Image>
        </DataTemplate>
    </ListBox.ItemTemplate>
</ListBox>
Run Code Online (Sandbox Code Playgroud)

我无法理解如何实施该解决方案.提前致谢.

silverlight-toolkit windows-phone-7 windows-phone-7.1

4
推荐指数
1
解决办法
669
查看次数

添加SilverLight ToolKit 5的引用

我搜索了这么多,但找不到任何解决方案,所以我决定把我的问题放在这里......所以请原谅我,如果这是一个愚蠢的问题.

我从这里下载Silverlight工具包:http://silverlight.codeplex.com/releases/view/78435 [ Silverlight_5_Toolkit_December_2011.msi ].我安装后

  1. 我在windows7中发现了" Microsoft Silverlight 5 Toolkit December 2011 ",列出了" 所有程序 "列表.但当我点击" Toolkit Samples "时,它会显示" Missing Shortcut " 窗口.

  2. 当我解压缩" 示例源代码 "并打开解决方案" Silverlight.Controls.Samples.sln "时,它在我的" 解决方案资源管理器 "中加载了两个项目

    (i)Controls.Samples(ii)Controls.samples.Common

  3. 我发现当我点击" 参考 "节点时,很多参考文献都缺失了.例如:(i)System.Windows.Controls.Data.DataForm.Toolkit
    (ii)System.Windows.Controls.DataVisualization.toolkit 等.....

  4. 我无法理解在哪里可以找到有助于摆脱缺失引用问题的DLL.

注意:我已检查" Sample source code.zip "中的两个名为" Binaries "的文件夹和所需DLL的" source code.zip "......但它对我没有帮助....

silverlight visual-studio-2010 silverlight-toolkit silverlight-5.0

4
推荐指数
1
解决办法
2万
查看次数