No. You can only vote in your partie's primary - that is, if you're registered Democrat, you can vote in the Democratic primary, but not the Republican primary, and vice versa if you're registered Republican. Independent parties, that I know of, don't have primaries, and if you're registered belonging to them you can't vote in the Republican or Democratic primaries.
I'm registered Democrat mainly because 1) in Maryland, a Republican vote is thrown away since Baltimore City and the Washington, D.C. urban sprawl go Democrat and make about 70% of Maryland's total population, and 2) I like to ward off the candidates I like least - in this case, Hillary - by voting against them in the primaries. Or, on the off chance that the Democratic party fielded a candidate I liked, I could vote for him/her... but so often in elections it's about trying to get the person you think will do the least amount of damage into office.
TANGENT: if there's any other Marylanders on this forum, don't bother hassling me about MD having a republican governor for once. Like I don't know that, because I do. We all know that the reason Erhlic won was because the Democrats were so confident that Kathleen Kennedy-Towson could win on name value alone that they barely campaigned. Also, Erhlic is the one person I might vote for Hillary over.