小编Amr*_*mar的帖子

WP7中的可滚动TextBox

我有一个文本框,用户可以在其中输入文本,只要他愿意.我面临的问题是,如果文本超过文本框的高度,那么我无法滚动文本.

为此,我尝试将文本框放在滚动查看器中,这解决了这个问题但创建了一个新问题,当文本超过滚动查看器的高度时,滚动查看器在键入时不会自动滚动.

知道如何做到这一点.注意: - 它应该像iPhone/iPad中的TextArea一样.

谢谢

textbox windows-phone-7

6
推荐指数
1
解决办法
4473
查看次数

在WP7中使用Facebook.dll发布到Facebook用户墙

如何使用WP7中的Facebook.dll在Facebook中发布到用户墙.我发现了一个名为PostAsync()的方法,但我无法理解这些参数.任何帮助都会感激不尽.谢谢

c# post facebook windows-phone-7

5
推荐指数
1
解决办法
8397
查看次数

ListPicker崩溃

我有一个具有以下结构的ListPicker:

toolkit:ListPicker x:Name="mListPicker" HorizontalAlignment="Right" Margin="0,75,43,0" Width="100" VerticalAlignment="Top">
< toolkit:ListPickerItem Content="5"/>
< toolkit:ListPickerItem Content="10"/>
< toolkit:ListPickerItem Content="15"/>
< toolkit:ListPickerItem Content="20"/>
< toolkit:ListPickerItem Content="25"/>
< toolkit:ListPickerItem Content="30"/>
< /toolkit:ListPicker>
Run Code Online (Sandbox Code Playgroud)

每当我尝试运行此命令时,会出现以下消息:

System.Windows.Markup.XamlParseException occurred
  Message= [Line: 0 Position: 0]
   --- Inner Exception ---
The parameter is incorrect. 

  LineNumber=0
  LinePosition=0
  StackTrace:
       at MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
       at MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
       at MS.Internal.XcpImports.FrameworkElement_ApplyTemplate(FrameworkElement frameworkElement)
       at System.Windows.FrameworkElement.ApplyTemplateInternal()
       at System.Windows.Controls.ScrollContentPresenter.HookupScrollingComponents()
       at System.Windows.Controls.ScrollContentPresenter.OnApplyTemplate()
       at System.Windows.FrameworkElement.OnApplyTemplate(IntPtr nativeTarget)
       at MS.Internal.XcpImports.MeasureNative(IntPtr element, Single inWidth, Single inHeight)
       at MS.Internal.XcpImports.UIElement_Measure(UIElement element, …
Run Code Online (Sandbox Code Playgroud)

xaml silverlight-toolkit windows-phone-7 listpicker

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

在Windows Phone中列出框的Selectionchanged事件问题

我有一个包含多个项目的列表框.并且选择已更改的事件已映射到一个函数.但每次我选择一个列表框项目时,事件都会被触发两次.结果我在第二轮中将所选索引作为-1.

有谁知道这种行为的原因?
XAML代码

<ListBox ItemTemplate="{StaticResource productTemplate}" Name="lstItems" SelectionChanged="ShowProductDetails">
Run Code Online (Sandbox Code Playgroud)


C#代码


private void ShowProductDetails(object sender, SelectionChangedEventArgs e)
{
    Item item = lstItems.SelectedItem as Item;
    int index = lstItems.SelectedIndex;
}
Run Code Online (Sandbox Code Playgroud)

windows-phone-7 windows-phone-7.1

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

C++中两个指针向量的减法和相交

我有两个向量,指向我的自定义类对象.
这两个向量中的指针不指向同一个对象,但存储在对象中的值是相同的.

我的自定义类结构是:


Class Item
{
   string ItemId;
   string ItemDescription;
   float ItemPrice;
}
第一矢量(V1)具有n个条目,第二矢量(V2)具有m个条目(n> m).

我要执行两个操作:

  • 获取一个在V1V2中都有共同对象的向量.通常,我的意思是说元素的ItemId是相同的.(可以称为V1和V2的交点).

  • 获取具有V2中不存在的元素的向量.(可以称为V1-V2).

    如何以有效的方式做到这一点?

  • c++ stdvector

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