TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Jaima Joseph
NA
94
107.8k
How to add style to dynamic stackpanel in windows store apps
Nov 4 2014 1:41 AM
Hi, I have developed a store app to show a list of items dynamically from my database in my store app page .It is showing data perfectly. Now I want to change its style, but I don't know how to do. I have searched the net a lot and tried ,
1)
<
Application.Resources
>
<
ResourceDictionary
>
<
Style
TargetType
="StackPanel" >
<
Setter
Property
="Background"
Value
="Red"/>
</
Style
>
/
ResourceDictionary
>
</
Application.Resources
>
2)Also I tried to add the code in cs file where I am adding the dynamic control like..,
Spanel.Background.SetValue();
etc.
but nothing is working
,I don't know how to code or where to code....
the dynamically added code is,
foreach
(
var
inv
in
Inventlist)
{
GridViewItem
InvGridview =
new
GridViewItem
();
StackPanel
Spanel =
new
StackPanel
();
//Spanel.Children.Add(new TextBlock() {Text="{Binding Title}" Style="{StaticResource TitleTextStyle}" TextWrapping="NoWrap"});
//Spanel.Background.SetValue();
Spanel.Children.Add(
new
TextBlock
() { Text =
"SKU: "
+ inv.SKUName.ToString() });
Spanel.Children.Add(
new
TextBlock
() { Text =
"Location: "
+ inv.LocName.ToString() });
Spanel.Children.Add(
new
TextBlock
() { Text =
"InventoryId: "
+ inv.InventoryId.ToString() });
InvGridview.Content = Spanel;
InventGrid.Items.Add(InvGridview);
}
Please help..
Reply
Answers (
0
)
Help me to download VS-2010 express for windows phone
Create Exam and Random questions from database.