score:-1
I didn't want to hassle more with the beginning space and finally made a decition to just allow the initial space and just strip all spaces from the Meta string eventually anyhow.
The problem actually turns out to be in the event it self so this was by solution for the being. Im not looking anything more into this since in turning over to meta with tags inside the actual message instead. And with a prefix. Eg. @meta Lets see how that works ;)
private string metaInput { get; set; }
public string MetaInput
{
get
{
return metaInput;
}
set
{
string x = value;
if (x.Length > 3)
{
if (x.EndsWith(" "))
{
string z = x.Replace(" ", "");
x = z.Replace(",", "");
int l = x.Length;
if (l > 2)
{
metaInput = null;
SaveMetaWord(x);
}
else
{
metaInput = null;
}
}
}
else
{
metaInput = value;
}
}
}
score:2
You final select has to be string and not the anonymous type
var str = from cu in x
// your stuff
select cu.username + cu.fname;
The other option is to keep your anonymous types and use StringFormat in the Binding
<TextBlock >
<TextBlock.Text>
<MultiBinding StringFormat="{}{0} {1}">
<Binding ElementName="username" Path="Text"/>
<Binding ElementName="name" Path="Text"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
Yet another option is to have a field in the anonymous type that has the complete string that you want displayed and use DisplayMemberPath for binding
Source: stackoverflow.com
Related Articles
- Populating a AutoCompleteBox with a list of anonymous types
- Linq Anonymous Types with list objects
- LINQ Select Distinct with Anonymous Types
- How can anonymous types be created using LINQ with lambda syntax?
- VB.NET linq group by with anonymous types not working as expected
- return list with anonymous type in entity framework
- Distinct in LINQ with anonymous types (in VB.NET)
- Difference of two List with different types using LINQ
- How to have a list with different data types of lists in it as a sublists?
- How do I dynamically construct an Expression Tree to use with anonymous types
- List with anonymous type
- C# - Linq optimize code with List and Where clause
- Is it possible to have an anonymous method when creating a list of items, with .NET + Linq?
- TryGetValue() in linq expression with anonymous types
- Extract List elements of specific types with LINQ
- Public property List needs to Concat 2 types with inheritance
- Linq returning list of anonymous types
- Use linq to make a projection of an anonymous class with a list
- Getting single result from a query with anonymous types in Linq To Sql
- How are anonymous types initialized with LINQ to Entities?
- Declaration of list of anonymous types
- multiple linq joins with anonymous types using lambda syntax
- I can't get pagination to show up in every page on a GridView with a list as source
- Join 2 lists on empty strings with Anonymous types in Linq
- LinqToSharepoint insert to list with multiple content types
- LINQ: Dealing with anonymous types
- Declaring list with anonymous type
- Need advice on how to best deal with the storing/unboxing of different types in a list and what is more optimal in my case
- Assigning anonymous type multiple times with the same property names and types
- Working with Anonymous Types with Linq in VB, C#
- Linq .Sum() function fails when there is nothing to Sum
- Update record based on group by
- Tricky LINQ Query using Entity Framework
- Return Index List from Dynamic Linq Query
- deduct insured amount after every routine checkup for each employee
- Join multiple List(Of String) in VB.NET
- LINQ extension method for multiple join with multiple GroupBy requirements
- Merge 2 lists of 2 different types (alternatives)
- The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities
- How to check variable length strings to see if they start with anything in the array
- Linq preserve and filter collection based on inner collection
- Update in LINQ with one trip to database?
- compare strings with multiple strings
- Net Core: Entity Framework ThenInclude with Projection Select
- Make LINQ extension methods apply to my class
- LINQ Join to find items NOT IN a list
- Best way to filter query by navigation property(child objects) in LINQ to SQL
- LINQ: A better way to select a property when the object may be null?
- Selecting Usernames Uniquely
- Error: The LINQ expression node type 'ArrayIndex' is not supported in LINQ to Entities